in reply to Re: Re: untarring number of files
in thread untarring number of files

Perhaps I'm missing something as well, but having the for loop iterate over the results of 'ls -l' doesn't seem like it'd work, as it would try to untar things like '-rw-rw-r--' and 'Oct'. Perhaps 'ls' would be more appropriate. Heck, you could even leave the external program out of it.
for file in *tar; do tar xvf $file; done

thor

Update:Yeah, I'm an idiot. "ell-ess dash ell" ne "ell-ess dash one". *shrugs*

Replies are listed 'Best First'.
Re: Re: Re: Re: untarring number of files
by Anonymous Monk on Oct 23, 2003 at 02:26 UTC
    That's a "one". ;) Gets us all...
Re: untarring number of files
by skx (Parson) on Oct 23, 2003 at 10:50 UTC

     You misread '-1' (dash one) as '-l' (dash ell).

     Using -one only produces the filenames and nothing else, so your point isn't a problem.

     Of course this loop does fail for cases where the filename contains either a space or a " character in their names ..

    Steve
    ---
    steve.org.uk