Skip to content

Instantly share code, notes, and snippets.

View arunreddy's full-sized avatar
🎯
Focusing

Arun Reddy arunreddy

🎯
Focusing
View GitHub Profile
@arunreddy
arunreddy / bash_template.sh
Created March 19, 2012 13:40
Bash : template
#-----------------------------------------------------------------------------------------------
# Check for number of arguments, Initialize them.
#-----------------------------------------------------------------------------------------------
[[ -n $1 && -n $2 && -n $3 && -n $4 && -n $5 && -n $6 ]] || { echo "Invalid input.Check the usage.." >&2; usage; exit 1; }
# debecho (debug-echo), by Stefano Falsetto ###
# Will echo passed parameters only if DEBUG is set to a value. ###
debecho () {
if [ ! -z "$DEBUG" ]; then