Apple Shell-Scripting Primer

Discussion in 'Mac Programming' started by Doctor Q, May 30, 2006.

  1. Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #1
    For those who are interested in learning more about writing Unix-style shell scripts under Mac OS X, Apple has authored a Shell Scripting Primer.

    You can read it in web form here or download it as a PDF here.
     
  2. Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #2
    Huh. Interesting find, Doc.

    I assume you found it looking for alternate way to use the Monte Carlo method for approximating the value of Pi?
     
  3. macrumors 6502

    Joined:
    May 19, 2005
    #3
    nice find! i usually look for anything to do with bash and that seems to work well.
     
  4. macrumors newbie

    MinkysBear

    Joined:
    Apr 7, 2008
    Location:
    Ohio
    #4
    Diff'ing between MS-DOS (FAT32) and Mac OS Extended (Journaled) Volumes

    When I ran the command
    diff -qr dirA dirB | sort > diffs.txt

    I received a lot of notifications that the "._filename.extension" were different on the one volume but not the other. What had happened is that that volume is formatted as MS-DOS (FAT32) and the other is as Mac OS Extended (Journaled).

    When I grep'ed through the diffs.txt file, I used the two flags as suggested above but this time removing any of those files that had the ._ in them

    grep -v -e '._' diffs.txt
    or
    grep -v -e ': .' diffs.txt // since the format was "full_path: filename"

    ... that showed me the real differences between the directories.

    Thanks!
     

Share This Page