Am I first?

> 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

#!/bin/bash

dir=`/path/to/dir`
cd $dir
for i in `ls -1`
do
        cat $i >> file
done

--------

if you execute the script in the dir, it will be appended to the file

Gavin Sherry
LinuxWorld.com.au - Editor

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