On Monday 23 June 2003 10:54 am, Richard Crawford wrote:
> Suppose I have a short script as such:
>
> find . -name 'wwwboard.html' -print | while read i
> do
>   print $i
> done
>
> how can I pass the name of the directory where $i lurks to another
> variable, such as $dir?


Well, you could do something like:  

MYDIR=$PWD
find . -name 'wwwboard.html' -print | while read i
do
  print $i
done


there's other ways to do it of course, $PWD is the pwd, but if you call cd you 
will change it.  You could also use `pwd`  in a variable to...

Mike

-- 
[EMAIL PROTECTED]
Mike Wenk
        
_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to