Bug 7203 - [PATCH] fetch -o - file:/path/name doesn't go to stdout
Summary: [PATCH] fetch -o - file:/path/name doesn't go to stdout
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.6-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-07-07 23:40 UTC by bmah
Modified: 1998-09-17 01:20 UTC (History)
0 users

See Also:


Attachments
file.diff (1.92 KB, patch)
1998-07-07 23:40 UTC, bmah
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bmah 1998-07-07 23:40:01 UTC
"fetch -o - url://file/name" generally retrieves the URL to stdout.  
However, in the case of "file:/" URLs, fetch(1) creates a file called 
"-" in the current directory, containing the file contents.

How-To-Repeat: 
fetch -o - /etc/hosts
cat ./-
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-07-09 07:25:59 UTC
State Changed
From-To: open->suspended

awaiting committer 

Comment 2 smoergrd 1998-07-09 13:14:08 UTC
bmah@ca.sandia.gov writes:
> "fetch -o - url://file/name" generally retrieves the URL to stdout.  
> However, in the case of "file:/" URLs, fetch(1) creates a file called 
> "-" in the current directory, containing the file contents.

This is a result of fetch(1) trying to be smart instead of generic,
and will go away when I rewrite fetch(1) to use the fetch(3) library.

BTW Jordan, still no feedback from you... should I go ahead and import
libfetch into the tree? I'm halfway through rewriting the FTP bits, if
I get my lazy arse in gear I might finish that this weekend; then I
can start hacking away on fetch(1)...

DES
-- 
Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com
Comment 3 Dag-Erling Smørgrav freebsd_committer freebsd_triage 1998-09-17 01:00:49 UTC
Responsible Changed
From-To: freebsd-bugs->des

I'll look into it (since I'm already working on fetch...) 
Comment 4 Dag-Erling Smørgrav freebsd_committer freebsd_triage 1998-09-17 01:20:15 UTC
State Changed
From-To: suspended->closed

Better fix applied to -current and -stable.