"Oliver Elphick" <olly@lfix.co.uk> writes: > Bob Hilliard wrote: > >"Oliver Elphick" <olly@lfix.co.uk> writes: > > > >> To go to the directory you were in last: > >> cd ~- > > > > What is the purpose of the tilde in this command? In bash and > >sh, at least, `cd -' is what I was taught, and it works fine. Do some > >other shells require `cd ~-'? > > That is the Korn shell convention; I did not know that bash supported the > simpler form.
Bash also supports the ~- (and ~+) forms. They are shell expansions, whereas 'cd -' is a shortcut for the cd program itself. Look up "Tilde Expansion" in the bash (or ksh) man page for details. -- Carl Johnson [EMAIL PROTECTED]