View Full Version : wget on OS X
ScKaSx
Sep 11, 2007, 04:00 PM
Hi All,
Sorry for posting so many issues at once. Anyways, I compiled wget from source since it doesn't come native on osx and moved the binary to /usr/local/bin (and this is in my path).
I'm trying to run a typical (PC) wget command:
wget -q -O - ftp://ftp.mutt.org/mutt/devel/mutt-1.5.16.taar.gz | tar xvfz -
However, I get the following error:
" gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors "
Any clues on how I can fix this, or is my syntax somehow off for the wget command. Note: I have 10.4.9 and gzip is located in /usr/bin (don't think this makes a difference).
Cheers,
ScKaSx
mkrishnan
Sep 11, 2007, 04:05 PM
wget -q -O - ... | tar xvfz -
^ ^
I'm probably missing something quite obvious, but what are the two floating hyphens for? It's not usual unix parlance to have a hyphen with no flag attached to it.
itickings
Sep 11, 2007, 05:27 PM
I'm trying to run a typical (PC) wget command:
wget -q -O - ftp://ftp.mutt.org/mutt/devel/mutt-1.5.16.taar.gz | tar xvfz -
However, I get the following error:
" gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors "
Does it work better if you use wget -q -O - ftp://ftp.mutt.org/mutt/devel/mutt-1.5.16.tar.gz | tar xvfz - instead?
You can also try curl ftp://ftp.mutt.org/mutt/devel/mutt-1.5.16.tar.gz | tar xvfz -
Curl is included with OS X.
I'm probably missing something quite obvious, but what are the two floating hyphens for? It's not usual unix parlance to have a hyphen with no flag attached to it.
Well, it's not really that uncommon to refer to stdin/stdout that way, is it?
AlmostThere
Sep 11, 2007, 05:38 PM
I'm probably missing something quite obvious, but what are the two floating hyphens for? It's not usual unix parlance to have a hyphen with no flag attached to it.
IIRC, it 'normally' indicates some expected input is coming from stdin.
I have seen it in a few places used like this ... but no comment on standard-ness of it.
emotion
Sep 11, 2007, 06:34 PM
Are you sure that command line is correct. This can happen when the file isn't really gzipped etc
I use curl instead btw. 'curl -O url' is more or less the same as 'wget url'
Nugget
Sep 11, 2007, 06:42 PM
I'm probably missing something quite obvious, but what are the two floating hyphens for? It's not usual unix parlance to have a hyphen with no flag attached to it.
This is a very common shorthand for "stdin" when dealing with Unix command line apps.
ScKaSx
Sep 11, 2007, 06:48 PM
Hi all,
Just an update, I'm an idiot. It works, I just typed the URL wrong. If you'll notice in my post I added an extra 'a' to the tar file. Sorry for wasting everyones time.
Any ideas.
Cheers,
ScKaSx
mkrishnan
Sep 11, 2007, 07:38 PM
LOL glad you got it figured out. :)
And thanks for the education on stdin. I'd never seen that before.
itickings
Sep 12, 2007, 09:12 AM
Just an update, I'm an idiot. It works, I just typed the URL wrong. If you'll notice in my post I added an extra 'a' to the tar file. Sorry for wasting everyones time.
Yeah, I noticed (as you can see in my previous reply), but I tried to be a bit nicer than calling you, as you phrased it, an idiot. ;)
Nugget
Sep 12, 2007, 10:08 AM
I just figured it was a Dutch taar file ;)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.