joining a bunch of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



according to 'man bash', pathname expansion results in "an alphabetically
sorted list".  with that, i should think:
   cat file_prefix_* > final_file
should be sufficient.

BTW linux has a much longer command line length limit, though i don't know what
it is; i imagine 4K, at least.

On Fri, Nov 30, 2001 at 06:45:29AM -0600, Brent Harding wrote:
> I didn't use xargs, but I did cat `ls | sort` >file.
> At 04:33 PM 11/30/01 -0500, Nicolas wrote:
> >	ls file_prefix_* | sort | xargs cat > final_file
> >> I've heard of this, but it doesn't appear to be the thing, dos would do it
> >> if I copied and typed in all the names, would run out of command line
> >> anyway, 255 character limit.

[ snip ]

> >> How do
> >> >> > I put the files together to make one huge file without having to type all
> >> >> > the echo <file.a01 >> file
> >> >> > echo <file.a02 >> file
> >> >> >  and so on up to 99?
> >> >> > There must be a copy a range, like echo <file.a01-a99 >> file, or something
> >> >> > on that order. Using * won't necessarily copy them in numeric order though.

-- 
Henry Yen                                       Aegis Information Systems, Inc.
Senior Systems Programmer                       Hicksville, New York





[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]