[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: url-escaping a string in a shell script.



also sprach Joost Kooij (on Sat, 21 Jul 2001 01:56:26PM +0200):
>   perl -MURI::Escape -ne 'chomp; print uri_escape($_), "\n"'
> 
> A little scriptlet to do the same:
> 
>   #!/usr/bin/perl -w
>   use URI::Escape;
>   chomp, print uri_escape($_), "\n" while (<>);

almost, except that an input of "$1$29492948$6uK7lvoFHD2wWI.P.yF111"
is output as "$1$29492948$6uK7lvoFHD2wWI.P.yF111" even though the '$'
character needs to be escaped for HTTP... why?

martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
echo '[dO%O+38%O+PO/d0<0]Fi22os0CC4BA64E418CE7l0xAP'|dc

Attachment: pgpXYSU2aHBCV.pgp
Description: PGP signature


Reply to: