Summary
This chapter showed how to put some of the shell-scripting information presented in the book to use for fun little shell scripts. Each script reinforced material covered in the chapters along with a few new commands and ideas.
The chapter demonstrated how to send a message to another user on the Linux system. The script checked to see whether the user was logged on to the system and whether the user allowed messaging. After those checks were made, the passed message was sent using the write
command. Included were some suggestions for modifying this script, which improve your shell-scripting abilities.
The next section walked you through obtaining website information using the wget
utility. The created script pulled a quote from the web. After retrieval, the script used several utilities to pull out the actual quote text. These now familiar commands included sed
, grep
, gawk
, and the tee
command. For this script, suggestions were made for how the script could be modified. These...