Subject: .bashrc functions for all
From: captgoodnight (captgoodnight@hotmail.com)
Date: Fri Jan 16 2004 - 10:55:32 AKST
Honored to help penguins. I was smiles after reading about rsync too. I have
an idear, howa about posting your favorite .bashrc functions, I have picked
up a few here and there that a really useful.
# Define some colors first: no worky in mail though ;(
red='\e[0;31m'
RED='\e[1;31m'
blue='\e[0;34m'
BLUE='\e[1;34m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m' # No Color
function fe() { find . -name '*'$1'*' -exec $2 {} \; ; } # find a file and
run $2 on it
#perl calc function
calc()
{ perl -wlne'print eval'; }
export -f calc
function swap() # swap 2 filenames around
{
local TMPFILE=tmp.$$
mv $1 $TMPFILE
mv $2 $1
mv $TMPFILE $2
}
share share share... bests -cg
-- Where ravens sleep No object can stop the driving rain In wind, the smallest object can be deadly Face the sun, to not see the shadows Linux --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.
This archive was generated by hypermail 2a23 : Fri Jan 16 2004 - 11:18:02 AKST