Tag Archives : bash

Regular expressions in Bash 3

Regular expressions in Bash 3

Since version 3 which released in 2004, Bash acquired a regular expression operator “=~”, but I never noticed it, probably because grep sed or other commands works alternatively well. The regular expression is the same as egrep,  you can find more details from man egrep.
Hudson: Clone jobs in Bash script

Hudson: Clone jobs in Bash script

With the help of Hudson’s remote access API, we can create/clone a bunch of jobs easily within seconds, here are some example scripts which can be used to explain how we achieve that.
shell script to monitor OpenVZ container running status

shell script to monitor OpenVZ container running status

If you’re using OpenVZ, you owe it to yourself to take a look at /proc/user_beancounters every now and again (the last column of this file makes a lot of sense, as it indicates protential problems), but when errors occurred in a container, mostly you lose your chance to run any command in that [...]
Set system variables in Debian and CentOS

Set system variables in Debian and CentOS

As indicated in title, this request is probably very common for sysadmins. For example, when a Java environment is ready, we need to make sure that JAVA_HOME is globally available for some system accounts, so that they can restart java instance smoothly.
How to Clear all BASH shell aliases?

How to Clear all BASH shell aliases?

How can I clear all UNIX bash shell aliases in one command? I just need to delete them in current session. You need to use unalias command, its syntax: unalias name To remove alias called foo, enter $ unalias foo
Difference between login shell and non-login shell

Difference between login shell and non-login shell

Understanding the distinction between your shell types, profile files and shell rc files is important because when you apply modifications to your system you need to know where  to set variables in order to make sure that they can be initialized as expected.
New Features in Bash-4.0

New Features in Bash-4.0

The first public release of bash-4.0 is now available here at GNU.org, and from the usual GNU mirror sites. Unlike previous bash distributions, this released file includes the formatted documentation (postscript, dvi, html, and nroffed versions of the manual pages). Diffs from bash-3.2 are not available.This [...]
SysAdmin Tips: Bash Shell Shortcuts

SysAdmin Tips: Bash Shell Shortcuts

Bash, which is the default shell in Linux contains a whole lot of key bindings which makes it really easy to use  The most commonly used shortcuts are listed below: Original version of this post is here at blogspot.com.
Bash shell fork() bomb

Bash shell fork() bomb

I just tried the famous shell fork() bomb on my Laptop, which is running Debian lenny. (I dare to do this because I’m going to shut down my laptop.) Please note that do NOT run it on your production server!
Backup disk partition tables

Backup disk partition tables

In storage environment, the file system reliability is almost a common issue. As for my understanding, when a ext3 file system is under use, its integrity is keeping broken day by day, as most of the threaded applicatons cannot take fully control of data blocks. After a long time running, fsck becomes [...]
© 2006-2011 Admon Home. All rights reserved.