On Fri, 2 Jun 2000, Terry Collins wrote:

> Hello Sluggers
> 
> Ran than risk brain fusion and since so many like showing off their
> scripting skills {:-), I thought I would just ask this one.
> 
> List every file in the directory and its contents (an integer number)
> 
> 
> I've been fiddling with
> 
> for o in 'ls -1'
> do
>   $o  'cat $o'  #but haven't twigged to what is wrong with 2nd part
> done  >> results

I'm not too sure what you wanted.

If there won't be huge numbers of files:

cat /path/to/dir/* >>results

If you want to do something more with each file:

(for o in `ls -1`
 do
   echo == $o == ; cat $o
 done ) >> results

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to