[olug] Unix Tip: SAYING PUT AND EXECUTING ELSEWHERE

Daniel G. Linder dlinder at iprevolution.com
Thu Jan 2 16:16:36 UTC 2003


What if the program you were running generated a lot of output files you didn't want in the current directory?  This way you could run the program somewhere else without changing to the directory, running it, and then changing back.  The example they gave is almost too simplistic -- I have seen convoluted cron jobs that use the ()'s to execute a number of programs under a specific directory.

Dan

-----Original Message-----
From: olug-admin at olug.org [mailto:olug-admin at olug.org]On Behalf Of Dave
Hull
Sent: Wednesday, January 01, 2003 3:47 PM
To: olug at olug.org
Subject: Re: [olug] Unix Tip: SAYING PUT AND EXECUTING ELSEWHERE


On Wed, 1 Jan 2003, Unix Guru Universe wrote:

> Doing things from the present directory. 
> Say, if you want to list all the files 
> in /etc directory being in your present 
> directory you can do so by typing 
> 
> $ (cd /etc; ls -l)

Whatever happened to good ol' "ls -l /etc" or if you want stay in your current 
directory while executing scripts in another something equally tricky like 
"/usr/local/bin/siggen.pl nordquist"?

I'm still trying to figure out a situation in which this technique might be 
more useful than simply using a full path.

-- 
Dave Hull
http://insipid.com

Remember when tables crashed (choose your ASCII or non-ascii
browser here)?
-- Steve Nordquist, Re: RIAA strikes again[Way OFFTOPIC], 05/19/00




More information about the OLUG mailing list