Kuang He wrote:
Hi,
I have a problem with a function in my ~/.bashrc
function header {
wget -O /dev/null -S '$1'
}
I wrote it in order to shorten my operation of ``wget -O /dev/null -S
'http://what.ever/' '''. But I cannot get it working the way I want.
It seems that bash strips off the single quotes off $1 and I want them
literally in the command line shown as the above. Can I make a work
around? Many thank!
Best regards,
Kuang He
Using " should work, or if you want a literal " you would use \" but
this would break it...
---
$ wget -O /dev/null \"http://www.debian.org\"
--17:47:52-- ftp://%22http//www.debian.org%22
=> `/dev/null'
Resolving %22http... failed: Host not found.
---
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature