bash question

Robert Meyer meyer_rm at yahoo.com
Fri Oct 17 01:58:19 EDT 2003


Well, if you're using 'bash' add this to your .bashrc:

tmp() {
cd $HOME/tmp
ls
}

Cheers!

--- Asheville Joe <josephj at main.nc.us> wrote:
> I wrote the following script that does not work:
> 
> #!/bin/bash
> # tmp - go to my tmp dir
> cd ~/tmp
> ls
> 
> It goes to my tmp dir, lists the dir, but because it runs in a subshell 
> that exits, I'm left in whatever directory I was in to start with.
> 
> I tried running ". tmp" and that works as desired.
> 
> Is there a way to do it so I don't have to type the dot each time?
> 
> Thanks.
> 
> Joe
> 
> -- 
> I always wanted to be a procrastinator, never got around to it.
> 
> 
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



More information about the nflug mailing list