Links for learning Unix/Terminal/Bash?

Discussion in 'Mac Programming' started by Dookieman, Jun 7, 2016.

  1. Dookieman macrumors 6502

    Joined:
    Oct 12, 2009
    #1
    Can anyone provide some links that show the basics of how to use the terminal? I've done some basic things, but I am interested in learning more in depth.
     
  2. 460works macrumors newbie

    Joined:
    May 13, 2016
    #2
    You'll find that you want to collect "man pages" (manual pages). Create a folder, name it, and start placing man pages there, as you find them. The Mac OS changes, and with it, some of the man pages are different - relative to older man pages. You could look up several online, but you'll learn that your Mac responds to the commands installed (and with those commands installed, are the man pages).

    An AppleScript that you can paste into an AppleScript Editor window:

    try
    set input_text to text returned of (display dialog "Input here:" default answer "")
    tell me to do shell script "man " & input_text & " | col -bx > /Users/`logname`/Desktop/" & input_text & ".txt 2>/dev/null ; wait"
    end try​

    Run that, and you'll get the idea. At the prompt, enter the name of a man page that you want to study. Suggested: networksetup (Enter that) and a new text file, networksetup.txt will show on your Desktop.

    Get the free text editor, TextWrangler. You'll understand, after using it a while.

    Online the Internet, look for the Command Line Administration manual in PDF form, for Apple Mac OS servers. There are different versions, but any would do, as a useful guide.

    OSXDaily.com: http://osxdaily.com/2011/11/02/enable-and-use-the-locate-command-in-the-mac-os-x-terminal/

    Useful command line tips: http://serverfault.com/questions/7346/what-are-useful-command-line-commands-on-mac-os-x


    -
     
  3. superscape, Jun 8, 2016
    Last edited: Jun 8, 2016

    superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #3
    Remember, OS X is UNIX under the hood, and when you're in the Terminal you're (most often) working in a bash shell. So look for good guides on bash and UNIX and you should find plenty of resources. A few minor things are different between OS X and, for example, Linux but a huge amount is identical.

    Back in the Olden Days I learnt using the O'Reilly guides. I think I started out with these O'Reilly guides:

    Learning Unix for OS X by Dave Taylor (good for starters)
    Unix in a Nutshell by Arnold Robbins (more heavyweight and detailed)

    There are also plenty of online user guides such as...

    http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

    Good luck!
     
  4. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
  5. Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009

Share This Page