[Novalug] All files in a directory...
James Ewing Cottrell 3rd
JECottrell3@Comcast.NET
Tue Jan 2 16:13:15 EST 2007
John Holland wrote:
>
> # from within the directory with the files
>
> ls | xargs cat | cat > out
[1] Why do you need the second pipe and cat? s/| cat//
> #contents will be in 'out'
[2] ls will find "out" and will copy itself to itself, forever.
A name like .out is better.
JIM
> On 12/28/06, Duane C. Mallory <malloryd@themallorys.us
> <mailto:malloryd@themallorys.us>> wrote:
>
> I would like to take all text files in a directory and append the data
> in them into one file with a different name. I was hoping I could
> cheat
> and use "find" to round them up and then "cat" to append them into
> another file; unfortunately all this does is append the file names
> into
> the new file - not the data in the files.
>
> Does any one have a down and dirty way of doing this?
>
> Thanks,
>
> DCM
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org <mailto:Novalug@calypso.tux.org>
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
> <http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Novalug mailing list
>Novalug@calypso.tux.org
>http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
>
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 1/2/2007 2:58 PM
>
>
More information about the Novalug
mailing list