bugGNU Wget - Bugs: bug #20520, wget -O - $URL says `-' saved but...

 
 

bug #20520: wget -O - $URL says `-' saved but there is no file -

Submitted by:  Noël Köthe <nok>
Submitted on:  Wed 18 Jul 2007 07:41:17 PM UTC  
 
Category: User InterfaceSeverity: 3 - Normal
Priority: 2Status: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: 1.10.2Operating System: GNU/Linux
Reproducibility: NoneFixed Release: 1.12
Planned Release: 1.15Regression: None
Work Required: 0 - HoursPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 03 Mar 2009 09:52:18 PM UTC, comment #6:

Likewise fixed for FTP retrievals in 63ba1b289aa0

Steven Schubiger <schubiger>
Project Member
Mon 23 Feb 2009 08:47:15 PM UTC, comment #5:

Fixed in 672d48697991

Micah Cowan <micahcowan>
Thu 27 Nov 2008 06:29:16 AM UTC, comment #4:

Thanks, Michael.

Actually, Noël's familiar with that issue: he's just complaining that Wget claims to save to a file named "-" when it actually saves to stdout.

Really, a simple fix to patch, but also quite low-pri.

Micah Cowan <micahcowan>
Thu 27 Nov 2008 03:03:53 AM UTC, comment #3:

hi, I think there might be a confussion about the meaning of -

to write to a file named - one should write to ./- instead, that's not a problem from wget it's the normal way - is interpreted (as an alias of stdout).

so:
$ LC_ALL=C wget -O ./- ix.de
--2008-11-27 00:49:03-- http://ix.de/
Resolving ix.de... 193.99.144.80
Connecting to ix.de|193.99.144.80|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.heise.de/ix/ [following]
--2008-11-27 00:49:04-- http://www.heise.de/ix/
Resolving http://www.heise.de... 193.99.144.85
Connecting to http://www.heise.de|193.99.144.85|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `./-'

[ <=> ] 29,184 21.7K/s in 1.3s

2008-11-27 00:49:06 (21.7 KB/s) - `./-' saved [29184]

$ ls -la
total 41
-rw-r--r-- 1 samus users 29184 2008-11-27 00:49 -
drwxr-xr-x 2 samus users 72 2008-11-27 00:49 .
drwx--x--x 117 samus users 9640 2008-11-27 00:47 ..

when you write to - you're using it as an alias of stdout, which will print the page to the console directly. I don't think this is useless since the rest the output is correctly sent to stderr so there's no mixing, you can handle them separately.

a real world example might be: http://www.linuxquestions.org/questions/linux-software-2/desktop-wallpaper-changer-646084/#post3243438 and the use of -q is independent of the use of -O- imho.

as for the messages sent, here's the output I see (v1.11.4):
$ LC_ALL=C wget -O - ix.de >/dev/null
--2008-11-27 00:55:45-- http://ix.de/
Resolving ix.de... 193.99.144.80
Connecting to ix.de|193.99.144.80|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.heise.de/ix/ [following]
--2008-11-27 00:55:46-- http://www.heise.de/ix/
Resolving http://www.heise.de... 193.99.144.85
Connecting to http://www.heise.de|193.99.144.85|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `STDOUT'

[ <=> ] 29,150 21.4K/s in 1.3s

2008-11-27 00:55:48 (21.4 KB/s) - `-' saved [29150]

(yet another example that uses -O- and not requires -q) it first says "Saving to: `STDOUT'" and then "`-' saved" which is probably not the clearest message but it's understandable I think.

Michael <samus_>
Sun 03 Feb 2008 05:26:59 AM UTC, comment #2:

If Micah understood this correctly, does it even matter? Saving to standard output only works with the -q option anyway (unless you want everything mixed together, which would have disastrous effects).

Joshua David Williams <yurimxpxman>
Wed 18 Jul 2007 08:12:24 PM UTC, comment #1:

Are you saying you wish the message from wget to say "written to standard output", rather than "saved to `-'"?

Micah Cowan <micahcowan>
Wed 18 Jul 2007 07:41:17 PM UTC, original submission:

Hello,

$ LC_ALL=C wget -O- ix.de
--21:37:41-- http://ix.de/
=> `-'
Resolving ix.de... 193.99.144.80
Connecting to ix.de|193.99.144.80|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.heise.de/ix/ [following]
--21:37:42-- http://www.heise.de/ix/
=> `-'
Resolving http://www.heise.de... 193.99.144.85
Connecting to http://www.heise.de|193.99.144.85|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[<=> ] 0 --.--K/s

...

[ <=> ] 27,404 71.27K/s

21:37:45 (71.03 KB/s) - `-' saved [27404]

$ ls -la
insgesamt 20
drwxr-xr-x 2 nk nk 4096 2007-07-18 21:27 .
drwxrwxrwt 13 root root 16384 2007-07-18 21:32 ..

there is no file with the name "-".

Noël Köthe <nok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by schubiger (Updated the item)
  • -unavailable- added by samus_ (Posted a comment)
  • -unavailable- added by yurimxpxman (Posted a comment)
  • -unavailable- added by micahcowan (Posted a comment)
  • -unavailable- added by nok (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Mar 2009 09:52:18 PM UTCschubigerStatusIn Progress=>Fixed
      Assigned toschubiger=>None
      Open/ClosedOpen=>Closed
    Thu 26 Feb 2009 09:11:05 PM UTCschubigerStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Mon 23 Feb 2009 08:47:15 PM UTCmicahcowanStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.12
    Wed 18 Feb 2009 08:13:21 PM UTCschubigerStatusNeed Info=>In Progress
      Assigned toNone=>schubiger
    Sun 27 Jan 2008 04:35:37 AM UTCmicahcowanPlanned Release1.12=>1.15
    Wed 01 Aug 2007 12:21:29 AM UTCmicahcowanPriority5 - Normal=>2
    Fri 20 Jul 2007 11:55:28 PM UTCmicahcowanWork RequiredNone=>0 - Hours
    Fri 20 Jul 2007 07:41:51 AM UTCmicahcowanPlanned ReleaseNone=>1.12
    Wed 18 Jul 2007 08:12:24 PM UTCmicahcowanStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1