tar command

atark at thepipeline.net atark at thepipeline.net
Wed Jul 4 11:56:19 PDT 2001

There is always a better way:

'for i in `ls | egrep "\.tar\.gz$|\.tgz$"`; do tar xzf $i; done;'

Oh well, had to use egrep though...  ;-)

atark at thepipeline.net

On Wednesday 04 July 2001 03:38 pm, you wrote:
> On Wed, Jul 04, 2001 at 01:29:44PM -0400, atark at thepipeline.net wrote:
> > Actually neither one works well if you have any plain *.gz files.  Try:
> >
> > 'for i in *.tar.gz; do tar xzf $i; done;'
> >
> > --Andy
> > atark at thepipeline.net
> I usually do.  But _that_ fails for .tgz files.  Also, I find straight
> .gz files to be extremely uncommon.  There're folders of them for man
> pages and localization files, but you never end up downloading them.
> Main exception there is .patch.gz files, but the point is that bash can
> do a lot without playing with sed/awk/perl/etc.
> Walter
> emage at spamcop.net
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list