[ale] Bash scripts for idiots...
Raptor
raptor at mindspring.com
Fri Nov 5 22:08:27 EST 1999
Why not just set up an alias for the directory in your .bashrc file?
alias src='cd /develop/src'
I think that will work. I have an alias to my apache directory that
looks like this:
alias apache='cd /home/httpd'
Hope this helps.
Rick
--
/*
****************************************************
* Do not seek to follow in the footsteps of the
* men of old;
* Seek what they sought. -- Basho
****************************************************
*/
On Fri, 05 Nov 1999 21:10:31 -0600, you wrote:
>OK - I'm having a very frustrating time getting the results I want out
>of a stupid bash script. All I want it to do is change directories
>then exit leaving me in the specified directory. Unfortunately, when
>the script exits, the environment (and my current directory) are
>restored to what they were before the script was run, thus making the
>whole script moot. For examples:
>
>--- snip ---
># !/bin/sh
>cd ~/develop/src
>dir
>--- snip ---
>
>When run from my home directory, it will change to the directory and
>give me the proper listing but, upon exit of the script, I'm still in
>my home directory. What stupid option am I missing from my bash
>script?
>
> thanx & later,
>
> Ben "I'm a programmer not a sysadmin!" Scherrey
More information about the Ale
mailing list