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...
The concept is fairly simple. Schedule a custom php script under crontab that will parse a weather rss feed and create a file containing weather info that we can use in our custom prompt.
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.
How to use a Bash Shell script to record the activity of users. This
script is useful in rebuilding the actions of users as they work at
the command line.
Although Picasa is now available on GNU/Linux, it is still proprietary and, as such, unethical. One year ago, I wrote a simple Bash script that handles a very rapid download of entire PicasaWeb albums/galleries. During the last weeks, Google changed twice the format of the related Web pages and my script could not fetch any picture.
What if we could use a bash script to use "apt-get" with Axel (a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file) so the "apt-get" download speed would increase dramatically? Well, you can, thanks to Matt Parnell who has created a bash script which does just that.
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.
When working with regular expressions in a shell script the norm is to use grep or sed or some other external command/program. Since version 3 of bash (released in 2004) there is another option: bash's built-in regular expression comparison operator "=~".
Previously I've shown how to use the bash while loop in a bash script. Today I'm going to show how to use another type of do loop in bash: the for loop.
Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script if the file names are pre-determined. You could also use process substitution to pass in the open files (command pipelines actually) from the command line.