Cover | Table of Contents | Colophon
C:\ world. In any case, the aim of this chapter is to familiarize
you with the Terminal, the shell, and some of the other tools you'll need through the
rest of the book.
$ date
Mon Dec 8 18:25:05 PST 2003
open -a application filename
$ open ~/Sites/index.html
www.barebones.com) so that you can edit the HTML, you
can use the -a option as shown:
$ open -a Safari ~/Sites/index.html
$ open -a Safari ~/Sites
$ open -a Safari
PATH environment
variable to find a program to execute in response to a command. To get an idea
of what kinds of data are stored in environment variables, execute the set command,
as shown in Example 3-6.
$ set
BASH=/bin/bash
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="powerpc-appledarwin7.0")
BASH_VERSION='2.05b.0(1)-release'
COLUMNS=80
DIRSTACK=()
EDITOR=/Users/duncan/bin/usebbedit
EUID=501
GROUPS=()
HISTFILE=/Users/duncan/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/Users/duncan
HOSTNAME=Incognita.local
HOSTTYPE=powerpc
...
$ tcsh
#!/bin/sh echo Hello World!
#!/bin/tsch. For most purposes it's best to write shell scripts using
either the sh or bash shells. Writing to the sh shell will result in scripts that are portable
to the greatest number of systems. Writing to
$ help alias
alias: alias [-p] [name[=value] ... ]
'alias' with no arguments or with the -p option prints the list
of aliases in the form alias NAME=VALUE on standard output.
Otherwise, an alias is defined for each NAME whose VALUE is given.
A trailing space in VALUE causes the next word to be checked for
alias substitution when the alias is expanded. Alias returns
true unless a NAME is given for which no alias has been defined.
$ man man
$ open ~/.bash_history
EDITOR environment variable), and
it can't be used to edit files while you are logged in remotely.
$ pico filename
editor on the system. This
means when a command-line tool, such as