Articles tagged with: shell script
Shell Scripting for HPC Clusters, Part 2
This is the second installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters. You can view the first part of the guide here.
Searching, Replacing, Comparing
Try to work with a large cluster and …
Shell Scripting for HPC Clusters, Part 1
This is the first installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters.
“For” and “While” Loop Constructs
The main challenge of supporting a Linux cluster is ensuring a homogeneous environment. Aside from small …
Shell Random Number Generator
Sometimes, in the course of writing shell script, a need arises for some random input. Using the built-in $RANDOM shell variable will give you a random number from 0 to 32767 . Let’s take a …
The Follies of Traffic Driving
Imagine a busy street in the city with sidewalks packed with pedestrians. Hundreds of people are pushing and shoving, eating, arguing, talking on their cell phones and not paying any attention to each other. Suddenly, …
Random Filename Chooser
This is a rather peculiar little script with a purpose that may not be immediately apparent. The script will look for files in the specified folder; it will then pick one at random from the …
Simple network monitoring with ping
In the Spring of 2005 Comcast experienced a major DNS outage. Since then many Comcast users have switched to DNS servers that belong to Verizon and other ISPs. Comcast started taking a lot of flak …
Generating complex SQL queries with shell scripts
It is sometimes necessary to use complex select and insert queries with dozens of variables. Writing such queries by hand is a tedious process and the chance of making a mistake is high. A few …
Bounce Veritas HA Cluster resource
The following is a Korn shell script that can be used from command line or cron to bounce a Veritas HA Cluster resource. This can be useful to resolve certain problems with Oracle databases running …
Handling errors and trapping system calls
In the course of writing a shell script it is important to consider possible error and unexpected interrupts. Let’s say you wrote an interactive script that allows users to archive old files to free up …
Wget examples and scripts
Wget is a command-line Web browser for Unix and Windows. Wget can download Web pages and files; it can submit form data and follow links; it can mirror entire Web sites and make local copies. …

Latest Comments