AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
This is an example of a Bash shell script used to loop through a list to compare to text strings found in logs. The script is used to detect and block attacks on a web site.
The Bash Shell provides the ability to create symbolic names which the shell stores in memory and which can be assigned values so that it can be used repeatedly in a shell script.
By and large, most Red Hat Linux systems will have Bash as the default shell. Bash is a darn great shell, but this article is about another equally great shell, called Z-Shell, that has most of the attributes of Bash, but in some cases goes the extra mile to give you the flexibility to customize your shell more than Bash allows.
Bash Shell scripting...every Linux admin needs it to save time. One aspect of shell scripting is writing functions. Creating functions in your scripts allows you to create containers of code that you can reuse in one script or multiple scripts. This tutorial, with examples, shows you how to create functions. The article is a part of a free shell scripting course.
The positions of variables in a Bash Shell script may be used by the script as a reference. These built-in parameters are useful methods for building scripts.
The Bash Debugger Project (bashdb) lets you set breakpoints, inspect variables, perform a backtrace, and step through a bash script line by line. In other words, it provides the features you expect in a C/C++ debugger to anyone programming a bash script.