Shell Scripting by Parker Steve

Shell Scripting by Parker Steve

Author:Parker, Steve
Language: eng
Format: epub
Publisher: John Wiley & Sons
Published: 2011-07-31T16:00:00+00:00


Related to nohup is disown; a command already running can be disowned in the same way that a nohup process is automatically disowned.

node1$ sleep 500 & [1] 29342 node1$ disown %1 node1$ exit logout Connection to node1 closed. node7:~$ ssh node1 steve@ node1's password: Linux node1 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64 Last login: Wed Mar 16 22:30:50 2011 from 78.145.17.30 node1$ ps -eaf|grep sleep steve 29342 1 0 22:30 ? 00:00:00 sleep 500 node1$

Summary

A lot of different shells are available on Unix and Linux systems; this chapter looked at some of the most popular. They are all superficially very similar in that they all provide an interactive command-line interface to the system, and they all run basic shell scripts in the same way, but in practice there is a world of difference between them, which can make porting scripts from one shell to another very time-consuming and cumbersome.

Understanding the range of differences between systems is key to writing portable and robust shell scripts, as well as being comfortable with any customer’s system however it is configured. Also, using aliases, prompts, and profile settings can make your home systems much more familiar and therefore productive, whether that is on a home network, an intranet, or company-wide.

The site http://en.wikipedia.org/wiki/Comparison_of_command_shells has an exhaustive comparison of all of the major shells available.

This chapter marks the end of the more theoretical part of this book. Part II looks in more depth at the individual tools available in Unix and Linux. Part III looks into uses of particular shell features more closely, and provides various practical recipes for typical real-life tasks.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.