CartMetrix - Do you know yours?

« XSLT Transforms With Sablotron | Home | iTunes and Links to Music Store »

6/15/2006

Directory Shortcuts Using Bash Functions

Modify this snippet to match the directory shortcuts you need on your system and add into your .bashrc file:

www () {
if [ $1 == "domain1" ]; then
        cd /www/vhosts/domain1.com/htdocs
elif [ $1 == "domain2" ]; then
        cd /www/vhosts/domain2.com/htdocs              
else
        cd /www/vhosts/$1 ;
fi
echo `pwd`;
}

To use:

www domain1

Popularity: 13%

Trackback:

Related Posts

Post your opinion

Verification Image

Please type the letters you see in the picture.

Subscribe without commenting


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2009 damonparker.org. all rights reserved.

Close
E-mail It