public inbox for blinux-list@redhat.com
 help / color / mirror / Atom feed
* joining a bunch of files
@  Brent Harding
   ` Luke Davis
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Brent Harding @  UTC (permalink / raw)
  To: blinux-list

		I encrypted a zip archive I had with pgp. Now, I have files with
extensions of a01 to a99 that have to be joined in order from 01 to 99 so I
can decrypt the whole thing. Decrypting only the first doesn't return
everything, so it must be split, used the a option, and rezipped the 99
files to another archive so I wouldn't have 99 files laying around. 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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
   joining a bunch of files Brent Harding
@  ` Luke Davis
   ` Mike Gorse
   ` dreamwvr
  2 siblings, 0 replies; 17+ messages in thread
From: Luke Davis @  UTC (permalink / raw)
  To: blinux-list

All kinds of easy solutions come to mind, none of which will necessarily
do them in order.

This, however, should (I just tested it locally on similarly named
files; it works under bash):

eval `ls -1 file.a[0-9][0-9] | awk '{print "cat", $1, ">> file;"}'

Regards,

Luke



On Fri, 30 Nov 2001, Brent Harding wrote:

> 		I encrypted a zip archive I had with pgp. Now, I have files with
> extensions of a01 to a99 that have to be joined in order from 01 to 99 so I
> can decrypt the whole thing. Decrypting only the first doesn't return
> everything, so it must be split, used the a option, and rezipped the 99
> files to another archive so I wouldn't have 99 files laying around. 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.
>
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
   joining a bunch of files Brent Harding
   ` Luke Davis
@  ` Mike Gorse
   ` dreamwvr
  2 siblings, 0 replies; 17+ messages in thread
From: Mike Gorse @  UTC (permalink / raw)
  To: blinux-list

Try something like
ls file.* |sort >file

--Michael Gorse / ICQ:22583968 / http://mgorse.home.dhs.org

On Fri, 30 Nov 2001, Brent Harding wrote:

> 		I encrypted a zip archive I had with pgp. Now, I have files with
> extensions of a01 to a99 that have to be joined in order from 01 to 99 so I
> can decrypt the whole thing. Decrypting only the first doesn't return
> everything, so it must be split, used the a option, and rezipped the 99
> files to another archive so I wouldn't have 99 files laying around. 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.
>
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
   joining a bunch of files Brent Harding
   ` Luke Davis
   ` Mike Gorse
@  ` dreamwvr
     ` Luke Davis
       [not found]   ` <Pine.BSF.4.43.0111301549410.66683-100000@server1.shellworl d.net>
  2 siblings, 2 replies; 17+ messages in thread
From: dreamwvr @  UTC (permalink / raw)
  To: blinux-list

man join
On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> 		I encrypted a zip archive I had with pgp. Now, I have files with
> extensions of a01 to a99 that have to be joined in order from 01 to 99 so I
> can decrypt the whole thing. Decrypting only the first doesn't return
> everything, so it must be split, used the a option, and rezipped the 99
> files to another archive so I wouldn't have 99 files laying around. 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.
> 
> 
> 
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
   ` dreamwvr
@    ` Luke Davis
       [not found]   ` <Pine.BSF.4.43.0111301549410.66683-100000@server1.shellworl d.net>
  1 sibling, 0 replies; 17+ messages in thread
From: Luke Davis @  UTC (permalink / raw)
  To: blinux-list

Join, meaning the relational database utility?

Even if that can do this, and I'm not convinsed that it can, that is a lot
of learning for a simple problem--from one readthrough of the man page, I
have no clear picture of what this is even supposed to acomplish, let
alone how to make it do things for which it does not appear to be
intended.


On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:

> man join
> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> > 		I encrypted a zip archive I had with pgp. Now, I have files with
> > extensions of a01 to a99 that have to be joined in order from 01 to 99 so I
> > can decrypt the whole thing. Decrypting only the first doesn't return
> > everything, so it must be split, used the a option, and rezipped the 99
> > files to another archive so I wouldn't have 99 files laying around. 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.
> >
> >
> >
> >
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/blinux-list
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       [not found]   ` <Pine.BSF.4.43.0111301549410.66683-100000@server1.shellworl d.net>
@      ` Brent Harding
         ` Luke Davis
                         ` (3 more replies)
       ` John G. Heim (26 2-9887)
  1 sibling, 4 replies; 17+ messages in thread
From: Brent Harding @  UTC (permalink / raw)
  To: blinux-list

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.
At 03:51 PM 11/30/01 -0500, you wrote:
>Join, meaning the relational database utility?
>
>Even if that can do this, and I'm not convinsed that it can, that is a lot
>of learning for a simple problem--from one readthrough of the man page, I
>have no clear picture of what this is even supposed to acomplish, let
>alone how to make it do things for which it does not appear to be
>intended.
>
>
>On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
>
>> man join
>> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
>> > 		I encrypted a zip archive I had with pgp. Now, I have files with
>> > extensions of a01 to a99 that have to be joined in order from 01 to 99
so I
>> > can decrypt the whole thing. Decrypting only the first doesn't return
>> > everything, so it must be split, used the a option, and rezipped the 99
>> > files to another archive so I wouldn't have 99 files laying around.
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.
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Blinux-list mailing list
>> > Blinux-list@redhat.com
>> > https://listman.redhat.com/mailman/listinfo/blinux-list
>>
>>
>>
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>>
>
>
>
>_______________________________________________
>Blinux-list mailing list
>Blinux-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/blinux-list
>
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       ` Brent Harding
@        ` Luke Davis
         ` Nicolas Pitre
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Luke Davis @  UTC (permalink / raw)
  To: blinux-list

Try that shell command I sent; it'll work.

On Fri, 30 Nov 2001, Brent Harding wrote:

> 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.
> At 03:51 PM 11/30/01 -0500, you wrote:
> >Join, meaning the relational database utility?
> >
> >Even if that can do this, and I'm not convinsed that it can, that is a lot
> >of learning for a simple problem--from one readthrough of the man page, I
> >have no clear picture of what this is even supposed to acomplish, let
> >alone how to make it do things for which it does not appear to be
> >intended.
> >
> >
> >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
> >
> >> man join
> >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
> >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
> so I
> >> > can decrypt the whole thing. Decrypting only the first doesn't return
> >> > everything, so it must be split, used the a option, and rezipped the 99
> >> > files to another archive so I wouldn't have 99 files laying around.
> 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.
> >> >
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Blinux-list mailing list
> >> > Blinux-list@redhat.com
> >> > https://listman.redhat.com/mailman/listinfo/blinux-list
> >>
> >>
> >>
> >> _______________________________________________
> >> Blinux-list mailing list
> >> Blinux-list@redhat.com
> >> https://listman.redhat.com/mailman/listinfo/blinux-list
> >>
> >
> >
> >
> >_______________________________________________
> >Blinux-list mailing list
> >Blinux-list@redhat.com
> >https://listman.redhat.com/mailman/listinfo/blinux-list
> >
> >
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       ` Brent Harding
         ` Luke Davis
@        ` Nicolas Pitre
           ` Luke Davis
           ` Brent Harding
       [not found]       ` <Pine.BSF.4.43.0111301627330.66683-100000@server1.shellworl d.net>
         ` Jude DaShiell
  3 siblings, 2 replies; 17+ messages in thread
From: Nicolas Pitre @  UTC (permalink / raw)
  To: Brent Harding; +Cc: blinux-list

What about:

	ls file_prefix_* | sort | xargs cat > final_file


Nicolas


On Fri, 30 Nov 2001, Brent Harding wrote:

> 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.
> At 03:51 PM 11/30/01 -0500, you wrote:
> >Join, meaning the relational database utility?
> >
> >Even if that can do this, and I'm not convinsed that it can, that is a lot
> >of learning for a simple problem--from one readthrough of the man page, I
> >have no clear picture of what this is even supposed to acomplish, let
> >alone how to make it do things for which it does not appear to be
> >intended.
> >
> >
> >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
> >
> >> man join
> >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
> >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
> so I
> >> > can decrypt the whole thing. Decrypting only the first doesn't return
> >> > everything, so it must be split, used the a option, and rezipped the 99
> >> > files to another archive so I wouldn't have 99 files laying around.
> 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.
> >> >
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Blinux-list mailing list
> >> > Blinux-list@redhat.com
> >> > https://listman.redhat.com/mailman/listinfo/blinux-list
> >>
> >>
> >>
> >> _______________________________________________
> >> Blinux-list mailing list
> >> Blinux-list@redhat.com
> >> https://listman.redhat.com/mailman/listinfo/blinux-list
> >>
> >
> >
> >
> >_______________________________________________
> >Blinux-list mailing list
> >Blinux-list@redhat.com
> >https://listman.redhat.com/mailman/listinfo/blinux-list
> >
> >
> 
> 
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
> 




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
         ` Nicolas Pitre
@          ` Luke Davis
           ` Brent Harding
  1 sibling, 0 replies; 17+ messages in thread
From: Luke Davis @  UTC (permalink / raw)
  To: blinux-list; +Cc: Brent Harding

That should work as well, although mine was far more fun to write.:)

On Fri, 30 Nov 2001, Nicolas Pitre wrote:

>
> What about:
>
> 	ls file_prefix_* | sort | xargs cat > final_file
>
>
> Nicolas
>
>
> On Fri, 30 Nov 2001, Brent Harding wrote:
>
> > 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.
> > At 03:51 PM 11/30/01 -0500, you wrote:
> > >Join, meaning the relational database utility?
> > >
> > >Even if that can do this, and I'm not convinsed that it can, that is a lot
> > >of learning for a simple problem--from one readthrough of the man page, I
> > >have no clear picture of what this is even supposed to acomplish, let
> > >alone how to make it do things for which it does not appear to be
> > >intended.
> > >
> > >
> > >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
> > >
> > >> man join
> > >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> > >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
> > >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
> > so I
> > >> > can decrypt the whole thing. Decrypting only the first doesn't return
> > >> > everything, so it must be split, used the a option, and rezipped the 99
> > >> > files to another archive so I wouldn't have 99 files laying around.
> > 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.
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > _______________________________________________
> > >> > Blinux-list mailing list
> > >> > Blinux-list@redhat.com
> > >> > https://listman.redhat.com/mailman/listinfo/blinux-list
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >> Blinux-list mailing list
> > >> Blinux-list@redhat.com
> > >> https://listman.redhat.com/mailman/listinfo/blinux-list
> > >>
> > >
> > >
> > >
> > >_______________________________________________
> > >Blinux-list mailing list
> > >Blinux-list@redhat.com
> > >https://listman.redhat.com/mailman/listinfo/blinux-list
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/blinux-list
> >
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       [not found]       ` <Pine.BSF.4.43.0111301627330.66683-100000@server1.shellworl d.net>
@          ` Brent Harding
             ` dreamwvr
  0 siblings, 1 reply; 17+ messages in thread
From: Brent Harding @  UTC (permalink / raw)
  To: blinux-list

It did, thanks, haddiscovered my files were bad, not just missing, don't
understand why some files don't come back, but it's not a huge deal.
At 04:27 PM 11/30/01 -0500, you wrote:
>Try that shell command I sent; it'll work.
>
>On Fri, 30 Nov 2001, Brent Harding wrote:
>
>> 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.
>> At 03:51 PM 11/30/01 -0500, you wrote:
>> >Join, meaning the relational database utility?
>> >
>> >Even if that can do this, and I'm not convinsed that it can, that is a lot
>> >of learning for a simple problem--from one readthrough of the man page, I
>> >have no clear picture of what this is even supposed to acomplish, let
>> >alone how to make it do things for which it does not appear to be
>> >intended.
>> >
>> >
>> >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
>> >
>> >> man join
>> >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
>> >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
>> >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
>> so I
>> >> > can decrypt the whole thing. Decrypting only the first doesn't return
>> >> > everything, so it must be split, used the a option, and rezipped
the 99
>> >> > files to another archive so I wouldn't have 99 files laying around.
>> 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.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Blinux-list mailing list
>> >> > Blinux-list@redhat.com
>> >> > https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Blinux-list mailing list
>> >> Blinux-list@redhat.com
>> >> https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>
>> >
>> >
>> >
>> >_______________________________________________
>> >Blinux-list mailing list
>> >Blinux-list@redhat.com
>> >https://listman.redhat.com/mailman/listinfo/blinux-list
>> >
>> >
>>
>>
>>
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>>
>
>
>
>_______________________________________________
>Blinux-list mailing list
>Blinux-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/blinux-list
>
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
         ` Nicolas Pitre
           ` Luke Davis
@          ` Brent Harding
             ` Henry Yen
  1 sibling, 1 reply; 17+ messages in thread
From: Brent Harding @  UTC (permalink / raw)
  To: blinux-list

I didn't use xargs, but I did cat `ls | sort` >file.
At 04:33 PM 11/30/01 -0500, you wrote:
>
>What about:
>
>	ls file_prefix_* | sort | xargs cat > final_file
>
>
>Nicolas
>
>
>On Fri, 30 Nov 2001, Brent Harding wrote:
>
>> 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.
>> At 03:51 PM 11/30/01 -0500, you wrote:
>> >Join, meaning the relational database utility?
>> >
>> >Even if that can do this, and I'm not convinsed that it can, that is a lot
>> >of learning for a simple problem--from one readthrough of the man page, I
>> >have no clear picture of what this is even supposed to acomplish, let
>> >alone how to make it do things for which it does not appear to be
>> >intended.
>> >
>> >
>> >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
>> >
>> >> man join
>> >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
>> >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
>> >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
>> so I
>> >> > can decrypt the whole thing. Decrypting only the first doesn't return
>> >> > everything, so it must be split, used the a option, and rezipped
the 99
>> >> > files to another archive so I wouldn't have 99 files laying around.
>> 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.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Blinux-list mailing list
>> >> > Blinux-list@redhat.com
>> >> > https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Blinux-list mailing list
>> >> Blinux-list@redhat.com
>> >> https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>
>> >
>> >
>> >
>> >_______________________________________________
>> >Blinux-list mailing list
>> >Blinux-list@redhat.com
>> >https://listman.redhat.com/mailman/listinfo/blinux-list
>> >
>> >
>> 
>> 
>> 
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>> 
>
>
>
>_______________________________________________
>Blinux-list mailing list
>Blinux-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/blinux-list
>
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
           ` Brent Harding
@            ` Henry Yen
  0 siblings, 0 replies; 17+ messages in thread
From: Henry Yen @  UTC (permalink / raw)
  To: blinux-list

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




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
           ` Brent Harding
@            ` dreamwvr
  0 siblings, 0 replies; 17+ messages in thread
From: dreamwvr @  UTC (permalink / raw)
  To: blinux-list

hi,
  Was thinking about the join in PERL.. however the shell 
example would definately work..
Regards

On Fri, Nov 30, 2001 at 06:43:55PM -0600, Brent Harding wrote:
> It did, thanks, haddiscovered my files were bad, not just missing, don't
> understand why some files don't come back, but it's not a huge deal.
> At 04:27 PM 11/30/01 -0500, you wrote:
> >Try that shell command I sent; it'll work.
> >
> >On Fri, 30 Nov 2001, Brent Harding wrote:
> >
> >> 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.
> >> At 03:51 PM 11/30/01 -0500, you wrote:
> >> >Join, meaning the relational database utility?
> >> >
> >> >Even if that can do this, and I'm not convinsed that it can, that is a lot
> >> >of learning for a simple problem--from one readthrough of the man page, I
> >> >have no clear picture of what this is even supposed to acomplish, let
> >> >alone how to make it do things for which it does not appear to be
> >> >intended.
> >> >
> >> >
> >> >On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
> >> >
> >> >> man join
> >> >> On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> >> >> > 		I encrypted a zip archive I had with pgp. Now, I have files with
> >> >> > extensions of a01 to a99 that have to be joined in order from 01 to 99
> >> so I
> >> >> > can decrypt the whole thing. Decrypting only the first doesn't return
> >> >> > everything, so it must be split, used the a option, and rezipped
> the 99
> >> >> > files to another archive so I wouldn't have 99 files laying around.
> >> 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.
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > _______________________________________________
> >> >> > Blinux-list mailing list
> >> >> > Blinux-list@redhat.com
> >> >> > https://listman.redhat.com/mailman/listinfo/blinux-list
> >> >>
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> Blinux-list mailing list
> >> >> Blinux-list@redhat.com
> >> >> https://listman.redhat.com/mailman/listinfo/blinux-list
> >> >>
> >> >
> >> >
> >> >
> >> >_______________________________________________
> >> >Blinux-list mailing list
> >> >Blinux-list@redhat.com
> >> >https://listman.redhat.com/mailman/listinfo/blinux-list
> >> >
> >> >
> >>
> >>
> >>
> >> _______________________________________________
> >> Blinux-list mailing list
> >> Blinux-list@redhat.com
> >> https://listman.redhat.com/mailman/listinfo/blinux-list
> >>
> >
> >
> >
> >_______________________________________________
> >Blinux-list mailing list
> >Blinux-list@redhat.com
> >https://listman.redhat.com/mailman/listinfo/blinux-list
> >
> >
> 
> 
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       [not found]   ` <Pine.BSF.4.43.0111301549410.66683-100000@server1.shellworl d.net>
       ` Brent Harding
@      ` John G. Heim (26 2-9887)
  1 sibling, 0 replies; 17+ messages in thread
From: John G. Heim (26 2-9887) @  UTC (permalink / raw)
  To: blinux-list

If you[ve already decrypted and unzipped the files you can do this:

ls | xargs cat {} \;

ls sorts it's output alphabetically by default. xargs takes the output from 
ls as it's argument list and perfprms cat on each.

At 03:51 PM 11/30/01 -0500, you wrote:
>Join, meaning the relational database utility?
>
>Even if that can do this, and I'm not convinsed that it can, that is a lot
>of learning for a simple problem--from one readthrough of the man page, I
>have no clear picture of what this is even supposed to acomplish, let
>alone how to make it do things for which it does not appear to be
>intended.
>
>
>On Fri, 30 Nov 2001, dreamwvr@dreamwvr.com wrote:
>
> > man join
> > On Fri, Nov 30, 2001 at 01:57:15PM -0600, Brent Harding wrote:
> > >             I encrypted a zip archive I had with pgp. Now, I have 
> files with
> > > extensions of a01 to a99 that have to be joined in order from 01 to 
> 99 so I
> > > can decrypt the whole thing. Decrypting only the first doesn't return
> > > everything, so it must be split, used the a option, and rezipped the 99
> > > files to another archive so I wouldn't have 99 files laying around. 
> 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.
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Blinux-list mailing list
> > > Blinux-list@redhat.com
> > > https://listman.redhat.com/mailman/listinfo/blinux-list
> >
> >
> >
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/blinux-list
> >
>
>
>
>_______________________________________________
>Blinux-list mailing list
>Blinux-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/blinux-list


--
John G. Heim
WiscINFO Customer Service Coordinator
Division of Information Technology
jheim@doit.wisc.edu
608-262-9887




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       ` Brent Harding
                         ` (2 preceding siblings ...)
       [not found]       ` <Pine.BSF.4.43.0111301627330.66683-100000@server1.shellworl d.net>
@        ` Jude DaShiell
           ` Luke Davis
       [not found]         ` <Pine.BSF.4.43.0112070250210.85814-100000@server1.shellworl d.net>
  3 siblings, 2 replies; 17+ messages in thread
From: Jude DaShiell @  UTC (permalink / raw)
  To: blinux-list

Your safest way is going to be with a little shell script.  If you have
the vis command it's probably better than cat -v.  I don't know if these
files are parts of a binary or text file.  The general script would look
something like this.  The redirection I do is for a good reason. cat -v a1
a2 a3 a4 a5 a6 a7 a8 a9 >>afile. The first line of the script would be
#!/bin/sh.  That longer line I wrote earlier would be duplicated as many
times as necessary and you'd change the numbers each line down the script.
so that the last line in the script would be cat a91 a92 a93 a94 a95 a96
a97 a98 a99 >>afile.  If you use a command like .,.s/a[1-9]/a1[1-9]/gp
<cr> That should change line 3 in the script from cat a1 a2 a3 a4 to cat
a11 a12 a13 a14 etc.

Jude <jdashiel@shellworld.net>





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
         ` Jude DaShiell
@          ` Luke Davis
       [not found]         ` <Pine.BSF.4.43.0112070250210.85814-100000@server1.shellworl d.net>
  1 sibling, 0 replies; 17+ messages in thread
From: Luke Davis @  UTC (permalink / raw)
  To: blinux-list

That's exactly what the awk command I posted (using eval), and the xargs
commands posted by others, do; without the extra steps.

On Fri, 7 Dec 2001, Jude DaShiell wrote:

> Your safest way is going to be with a little shell script.  If you have
> the vis command it's probably better than cat -v.  I don't know if these
> files are parts of a binary or text file.  The general script would look
> something like this.  The redirection I do is for a good reason. cat -v a1
> a2 a3 a4 a5 a6 a7 a8 a9 >>afile. The first line of the script would be
> #!/bin/sh.  That longer line I wrote earlier would be duplicated as many
> times as necessary and you'd change the numbers each line down the script.
> so that the last line in the script would be cat a91 a92 a93 a94 a95 a96
> a97 a98 a99 >>afile.  If you use a command like .,.s/a[1-9]/a1[1-9]/gp
> <cr> That should change line 3 in the script from cat a1 a2 a3 a4 to cat
> a11 a12 a13 a14 etc.
>
> Jude <jdashiel@shellworld.net>
>
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: joining a bunch of files
       [not found]         ` <Pine.BSF.4.43.0112070250210.85814-100000@server1.shellworl d.net>
@            ` Brent Harding
  0 siblings, 0 replies; 17+ messages in thread
From: Brent Harding @  UTC (permalink / raw)
  To: blinux-list

Wouldn't for do it some how?
The little I knew about hyperlogo, one would think of something like
for numbers=1-99
cat file.a$numbers > file
At 02:50 AM 12/7/01 -0500, you wrote:
>That's exactly what the awk command I posted (using eval), and the xargs
>commands posted by others, do; without the extra steps.
>
>On Fri, 7 Dec 2001, Jude DaShiell wrote:
>
>> Your safest way is going to be with a little shell script.  If you have
>> the vis command it's probably better than cat -v.  I don't know if these
>> files are parts of a binary or text file.  The general script would look
>> something like this.  The redirection I do is for a good reason. cat -v a1
>> a2 a3 a4 a5 a6 a7 a8 a9 >>afile. The first line of the script would be
>> #!/bin/sh.  That longer line I wrote earlier would be duplicated as many
>> times as necessary and you'd change the numbers each line down the script.
>> so that the last line in the script would be cat a91 a92 a93 a94 a95 a96
>> a97 a98 a99 >>afile.  If you use a command like .,.s/a[1-9]/a1[1-9]/gp
>> <cr> That should change line 3 in the script from cat a1 a2 a3 a4 to cat
>> a11 a12 a13 a14 etc.
>>
>> Jude <jdashiel@shellworld.net>
>>
>>
>>
>>
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>>
>
>
>
>_______________________________________________
>Blinux-list mailing list
>Blinux-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/blinux-list
>
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 joining a bunch of files Brent Harding
 ` Luke Davis
 ` Mike Gorse
 ` dreamwvr
   ` Luke Davis
     [not found]   ` <Pine.BSF.4.43.0111301549410.66683-100000@server1.shellworl d.net>
     ` Brent Harding
       ` Luke Davis
       ` Nicolas Pitre
         ` Luke Davis
         ` Brent Harding
           ` Henry Yen
     [not found]       ` <Pine.BSF.4.43.0111301627330.66683-100000@server1.shellworl d.net>
         ` Brent Harding
           ` dreamwvr
       ` Jude DaShiell
         ` Luke Davis
     [not found]         ` <Pine.BSF.4.43.0112070250210.85814-100000@server1.shellworl d.net>
           ` Brent Harding
     ` John G. Heim (26 2-9887)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).