Ask Dave Taylor: Tech and Business


Setting the command shell prompt in Mac OS X Terminal

I'm new to Mac, last Apple I owned was a IIe in the 80's. This question is related to your book Learning Unix for Mac OS X Tiger book, page 41 "Changing the Command Prompt. In this section you give the following command for changing the prompt:

      PS1= "? "

I typed this, but got the following response from the terminal window:

      -bash: ? : command not found

What am I doing wrong?

I can see exactly what the shell is complaining about, and I'll end any suspense by saying that you need to ensure that you never have superfluous spaces in the commands you type into Terminal or anywhere on a Unix command line. There's a world of different to the Bash shell between...