bash question

Asheville Joe josephj at main.nc.us
Fri Oct 17 11:44:26 EDT 2003


Thanks.  I'll try that.

Joe

Robert Meyer wrote:

>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
>
>  
>

-- 
"The whole aim of practical politics is to keep the populace alarmed (and hence clamorous to be led to safety) by menacing it with an endless series of hobgoblins, all of them imaginary." -- H.L. Mencken "If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money it values more, it will lose that, too." -- W. Somerset Maugham






More information about the nflug mailing list