O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Exercises

9.Write a sequence of commands or a script that demonstrates that parameter expansion occurs before variable expansion and that variable expansion occurs before pathname expansion.
10.Write a shell script that outputs the name of the shell that is executing it.
11.Type in the following shell scripts and run them:
$ cat report_dir 
old_dir=$(pwd)
echo "Current working directory:  " $old_dir
go_home
echo "Current working directory:  " $(pwd)

$ cat go_home
cd
echo "New working directory:  " $(pwd)
echo "Last working directory: " $old_dir

What is wrong? Change them so that they work correctly.

12.The following is a modified version of the read2 script from page 574. Explain why it behaves differently. For what type of input does it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required