|
Home > Archive > Unix questions > November 2006 > taking standard output and passing it to gunzip
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
taking standard output and passing it to gunzip
|
|
| brendan.wong@gmail.com 2006-11-22, 1:17 pm |
| hello. does anyone know how to take standard input and pass that as an
argument to the gunzip command? for example, i've tried
ls -l | awk '{print $9}' | gunzip
and, the result is:
gunzip: stdin: not in gzip format
i've also tried other variations, but i keep getting the same error.
can someone help? thanks
| |
|
| In article <1164217002.449940.97370@j44g2000cwa.googlegroups.com>,
brendan.wong@gmail.com wrote:
> awk '{print $9}'
gunzip is expecting input in gzip format, not a filename. Try
gunzip `ls -l | awk '{print $9}' `
Boyd
| |
| brendan.wong@gmail.com 2006-11-22, 1:17 pm |
| Thank you very much. that worked perfectly!
| |
| Bill Marcum 2006-11-22, 1:17 pm |
| On 22 Nov 2006 09:36:42 -0800, brendan.wong@gmail.com
<brendan.wong@gmail.com> wrote:
> hello. does anyone know how to take standard input and pass that as an
> argument to the gunzip command? for example, i've tried
>
> ls -l | awk '{print $9}' | gunzip
>
> and, the result is:
> gunzip: stdin: not in gzip format
>
> i've also tried other variations, but i keep getting the same error.
> can someone help? thanks
>
Why do you use 'ls -l' ?
gunzip *
--
A diplomat is a person who can tell you to go to hell in such a way that you
actually look forward to the trip.
-- Caskie Stinnett, "Out of the Red"
| |
| brendan.wong@gmail.com 2006-11-22, 7:22 pm |
| > Why do you use 'ls -l' ?
> gunzip *
i need to recursively gunzip a bunch of files. so if i can get this to
work, then i can probably extrapolate from that and achieve a recursive
gunzip.
| |
| Bill Marcum 2006-11-22, 7:22 pm |
| On 22 Nov 2006 11:29:42 -0800, brendan.wong@gmail.com
<brendan.wong@gmail.com> wrote:
>
> i need to recursively gunzip a bunch of files. so if i can get this to
> work, then i can probably extrapolate from that and achieve a recursive
> gunzip.
>
If you want to do something recursively, find is your friend.
--
QOTD:
"If I could walk that way, I wouldn't need the cologne, now would I?"
| |
| brendan.wong@gmail.com 2006-11-27, 7:23 pm |
| > If you want to do something recursively, find is your friend.
right on, i tried using "find" and that worked fabolously. thanks
again!
|
|
|
|
|