bash question

Asheville Joe josephj at main.nc.us
Thu Oct 16 15:05:25 EDT 2003


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.






More information about the nflug mailing list