1. "Where is date" tells us where the executable file "date" is located, according to the current $PATH value. The result tells us that the executable file "date" is found in /bin
2. echo $PATH
tells us what is the content of the $PATH environment parameter. Each path is separated by a colon ":".
3. "cat > date"
takes standard input (stdin) from the keyboard and put the keyed in content into a new file in the current directory called date. The input should be terminated by a control-d, which is not mentioned in the question.
The file "date" usually has a permission of 644 or 600 (depending on the computer implementation), which means that it is not executable.
...view middle of the document...
After executing the preceding commands, Jenny’s working directory is
/home/jenny/grants/biblios. When CDPATH is set and the working directory
is not specified in CDPATH, cd searches the working directory only
after it searches the directories specified by CDPATH.
B. After executing the preceding commands, Jenny’s working directory is
/home/jenny/biblios. When you give cd an absolute pathname as an argument,
cd does not use CDPATH.
7. In bash, the variable "$$" contains the pid of the current bash process, while "$PPID" contains the pid of the parent process, so which one to use depends on how you execute the script. A login shell is not unique in the system, maybe these commands are what you need.
$ sleep 30 | cat /etc/inittab
Is there any output from sleep? Where does cat get its input from? What
has to happen before the shell displays another prompt?
There is no output from sleep (try giving the command sleep 30 by itself).
The /etc/inittab file provides input for cat (when cat has an argument, it
does not check standard input). The sleep command has to run to completion
before the shell displays another prompt.
10. There are many ways to solve this problem. The following solutions are all