Shell scripting
30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
in Categories Linux, Shell scripting, UNIX last updated December 29, 2017An alias is nothing but shortcut to commands. The alias command allows user to launch any command or group of commands (including options and filenames) by entering a single word. Use alias command to display list of all defined aliases. You can add user defined aliases to ~/.bashrc file. You can cut down typing time with these aliases, work smartly, and increase productivity at the command prompt.
How To Use Bash Parameter Substitution Like A Pro
in Categories Linux, Shell scripting, UNIX last updated February 20, 2018The $ character is used for parameter expansion, and command substitution. You can use it for manipulating and expanding variables on demands without using external commands such as sed or awk.
10 Tools To Add Some Spice To Your UNIX/Linux Shell Scripts
in Categories Linux, Shell scripting, UNIX last updated January 13, 2018There are some misconceptions that shell scripts are only for a CLI environment. You can efficiently use various tools to write GUI and network (socket) scripts under KDE or Gnome desktops. Shell scripts can make use of some of the GUI widget (menus, warning boxes, progress bars, etc.). You can always control the final output, cursor position on the screen, various output effects, and more. With the following tools, you can build powerful, interactive, user-friendly UNIX / Linux bash shell scripts.
Linux x86_64: Detecting Hardware Errors
in Categories CentOS, Debian Linux, fedora linux, Gentoo Linux, Hardware, Howto, kernel, Linux, Linux distribution, Networking, package management, RedHat/Fedora Linux, Shell scripting, Sys admin, Tips, Troubleshooting, Ubuntu Linux last updated June 2, 2009The Blue Screen of Death (BSoD) is used for the error screen displayed by Microsoft Windows, after encountering a critical system. Linux / UNIX like operating system may get a kernel panic. It is just like BSoD. The BSoD and a kernel panic generated using a Machine Check Exception (MCE). MCE is nothing but feature of AMD / Intel 64 bit systems which is used to detect an unrecoverable hardware problem.
Program such mcelog decodes machine check events (hardware errors) on x86-64 machines running a 64-bit Linux kernel. It should be run regularly as a cron job on any x86-64 Linux system. This is useful for predicting server hardware failure before actual server crash.
Poll: Your Favorite Scripting Language?
in Categories Ask nixCraft, C Programming, Linux, Perl, php, Poll, programming, python, Shell scripting, Sys admin, UNIX last updated March 17, 2009Like most sys admin, I’m lazy. I try to automate almost all things in order to save time. Inexperienced sys admin and help desk staff working under me finds all these tools useful. It saves their time and avoids security issues. Automation allows help desk staff to do things that they don’t have enough direct system knowledge to do themselves. However, selecting correct tool and applying correct methodology is very important.
Note: There is a poll embedded within this post, please visit the site to participate in this post’s poll.
Debunking the "Linux is virus free" Myth
in Categories Debian Linux, Howto, Linux, Linux desktop, RedHat/Fedora Linux, Security, Shell scripting, Ubuntu Linux, Windows, windows vista last updated February 11, 2009Is Linux is virus free? The author of foobar blog provides some insight about the same. Linux users can’t just catch a virus by email or downloading malware from the Internet, contrary to “those Windows users”. From the foobar blog post:
Then you save an email attachment under Linux, the execute flag is normally NOT set and thus, the file can’t be executed just by clicking on it. So, no luck?
How To Write Object-Oriented Shell scripts For Multiple Platforms
in Categories Howto, Linux, programming, Shell scripting, Sys admin, UNIX last updated January 19, 2009This may come handy while writing cross-platform scripts.
If you don’t want to commit to the idiosyncrasies of a specific shell running on a particular platform, try the Squirrel Shell. The Squirrel Shell provides an advanced, object-oriented scripting language that works equally well on UNIX, Linux, Mac OS X, and Windows systems. Write a script once, and run it anywhere.
Squirrel is a high level imperative/OO programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games.
=> Speaking UNIX: The Squirrel portable shell and scripting language
Upgrade WordPress 2.7 in 3 Simple Steps
in Categories GNU/Open source, Howto, Linux, Shell scripting, Sys admin, Tips, UNIX last updated December 11, 2008Wordpress version 2.7 has been released and can be upgraded easily using UNIX / Linux shell prompt. A few assumptions:
- Wordpress database name: wptheosblog
- Wordpress directory name: /var/www/html/theos.in
- Wordpress domain name: theos.in
- Operating system: Linux

Linux / UNIX: Find Out If a Directory Exists or Not
in Categories CentOS, Debian Linux, File system, Gentoo Linux, Howto, Linux, Open source coding, programming, RedHat/Fedora Linux, Shell scripting, Suse Linux, Sys admin, Ubuntu Linux, UNIX last updated November 16, 2008I’ve already written a small tutorial about finding out if a file exists or not under Linux / UNIX bash shell. However, couple of our regular readers like to know more about a directory checking using if and test shell command.