CD Command [CD]

Qedit 5.7 for HP-UX

Home Previous Next


CD Command [CD]

Change current working directory.

CD[directory]

(Default: $home directory)

You can switch directories using the cd command. The cd command affects your Qedit processes and any processes that you create. When you exit Qedit, you will be in the same directory that you were in when you invoked Qedit.

Examples

cd /usr/local/bin
cd                       {return to home}
cd $HOME                 {return to home}
cd ~                     {return to home}
cd $SAVEDIR              {Error!!!}

The last example shows a limitation of cd inside Qedit. You can't refer to a directory name that is saved in a variable, because Qedit simulates the cd command, instead of passing it to your shell program for execution. Qedit does not simulate the shell command processing such as variable substitution. (The three special cases for "home" are hardcoded into Qedit's cd.)

In addition, a few things still do not work well when doing shell commands in Qedit. If you launch a command in the background using "&", the jobs command will not show the status of it. If you set an environment variable, it will not be set for Qedit. Both of these problems are caused by the fact that shell commands are executed by a child process which is unable to change the status of Qedit.


Home Previous Next