Re: ~/.bashrc problem
2005/4/15, Robert Vangel <robert@vangelr.net.au>:
> Using " should work, or if you want a literal " you would use \" but
> this would break it...
Using " works most of the time, but, if you encouter some URL like
http://bbs.ustc.edu.cn/cgi/sf?bid=260&aof=M425dea7e&fn=23.jpg
It does not work properly.
$ header http://bbs.ustc.edu.cn/cgi/sf?bid=260&aof=M425dea7e&fn=23.jpg
--18:07:28-- http://bbs.ustc.edu.cn/cgi/sf?bid=260
=> `/dev/null'
Resolving bbs.ustc.edu.cn... [1] 17002
[2] 17004
[2] Done aof=M425dea7e
Connecting to bbs.ustc.edu.cn[202.38.64.3]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Date: Fri, 15 Apr 2005 10:07:28 GMT
3 Server: Apache/1.3.27 (Unix) Debian GNU/Linux
4 Connection: close
5 Content-Type: application/x-executable
[ <=> ] 20 --.--K/s
18:07:28 (195.31 KB/s) - `/dev/null' saved [20]
[1]+ Done header http://bbs.ustc.edu.cn/cgi/sf?bid=260
If I use wget directly with the single quotes around the URL, you can
see the differece easily:
$ wget -O /dev/null -S
'http://bbs.ustc.edu.cn/cgi/sf?bid=260&aof=M425dea7e&fn=23.jpg'
--18:10:45-- http://bbs.ustc.edu.cn/cgi/sf?bid=260&aof=M425dea7e&fn=23.jpg
=> `/dev/null'
Resolving bbs.ustc.edu.cn... 202.38.64.3
Connecting to bbs.ustc.edu.cn[202.38.64.3]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Date: Fri, 15 Apr 2005 10:10:45 GMT
3 Server: Apache/1.3.27 (Unix) Debian GNU/Linux
4 Accept-Ranges: bytes
5 Connection: close
6 Content-Disposition: inline;filename=23.jpg
7 Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
8 Content-Length: 280435
9 Content-Type: image/jpeg
100%[====================================>] 280,435 --.--K/s
Last-modified header invalid -- time-stamp ignored.
18:10:45 (7.96 MB/s) - `/dev/null' saved [280435/280435]
--
Best regards,
James He
Reply to: