This chapter contains some of my most used scripts. Looking through them you will see that nearly all are fairly short and simple. That’s one of the beauties of scripts; they do not have to be long or complex, just so long as it can save you time.
In this chapter we will cover:
various script examples.
One script under consideration for this chapter was comet which is a general data validation databases script. However, as it’s over 500 lines long, I did not think the editor would approve of its inclusion in this book. The comet script started a couple of years ago as a five-liner script, but due to added features, it really has grown. Anyway, the six scripts I present to you are as follows:
pingall | A script that uses the /etc/hosts entries to ping all hosts |
backup_gen | A general purpose backup script that loads default settings |
del.lines | A sed wrapper that deletes lines from files |
access_deny | A utility to deny access to certain users logging in |
logroll | A utility to roll over logs if they reach a certain size |
nfsdown | A quick way to unmount all nfs directories |
3.16.165.255