A. B. C. D. E. The Answer Cannot Be Determined From The Information Given
A. B. C. D. E. The Answer Cannot Be Determined From The Information Given
Assume that the mentioned expressions are typed on the command line immediately
following the history command. Note that over 70 lines have been omitted from the output.
[student@station student]$ history
1 gimp rdu_map.png
2 bg
3 scp rdu_map.png @nimbus.example.com:/var/www/html/maps
...
81 gaim&
82 evolution&
83 ps aux | grepelvis
84 pkilloafd
85 ps aux | grepelvis
86 pgrep -u elvis
87 pgrep -ulelvis
88 pgrep --help
89 pgrep -luelvis
90 evolution&
91 history
Top of Form
rha030_bash_tes
1. On the following command line, what would be substituted for the expression !!?
A. evolution &
B. gimp rdu_map.png
C. prep -luelvis
D. history
2. On the following command line, what would be substituted for the expression !s?
B. pkilloafd
C. pgrep -luelvis
A. ~/.history
C. ~/.bash_history
Which of the following commands would display (only) the contents of the LANG
4.
environment variable?
A. echo $LANG
B. echo ${LANG}
C. A and B
Which of the following commands would change a bash shell's working directory to a
5.
user's home directory?
A. cd
B. cd ~
C. A and B
D. cd `(echo $HOME)`
In the following transcript, the user is trying to enable the nocaseglob shell option, but failing.
[student@station student]$ shoptnocaseglob
nocaseglob off
[student@station student]$ (shopt -s nocaseglob; set +f)
[student@station student]$ shoptnocaseglob
nocaseglob off
rha030_bash_tes
6. Why was the nocaseglob shell option not modified by the shoptbuiltin command?
The nocaseglob option was enabled, but it was enabled in a subshell. The original
A.
shell's shell nocaseglob option was not modified.
The wrong syntax for the shopt command was used. The correct syntax would be
B.
shopt +nocaseglob.
The nocaseglob option was enabled, but then immediately disabled by the following
C.
set command.
The wrong syntax for the shopt command was used. The correct syntax would be
D.
shopt -nocaseglob.
Which of the following command lines would add the /usr/games directory to the current
7.
shell's search path for executable files?
A. PATH=$PATH:/usr/games
B. PATH=/usr/games
C. PATH+=/usr/games
D. (PATH=$PATH:/usr/games)
B. 9123 0 student ps
C. 9123 0 /home/student ps
D. There is enough information provided, but none of the above answers are correct.
E. There is not enough information provided to answer this question.
C. A=$A B=brown
D. A= B=brown C=$C
10. Which of the following command lines could have produced the output above?
C. A and B