urlencode

(Command too long..See sample Output..)
curl doesn't provide url-encoding for 'GET' data, it have an option '--data-urlencode', but its only for 'POST' data. Thats why I need to write down this commandline. With 'perl', 'php' and 'python', this is one liner, but just I wrote it for fun. Works in Ubuntu, will work in all linux varients(I hope it will work in unix varients also).
Sample Output
$ sed -e's/./&\n/g' -e's/ /%20/g' | grep -v '^$' | while read CHAR; do test "${CHAR}" = "%20" && echo "${CHAR}" || echo "${CHAR}" | grep -E '[-[:alnum:]!*.'"'"'()]|\[|\]' || echo -n "${CHAR}" | od -t x1 | tr ' ' '\n' | grep '^[[:alnum:]]\{2\}$' | tr '[a-z]' '[A-Z]' | sed -e's/^/%/g'; done | sed -e's/%20/+/g' | tr -d '\n'; echo
http://www.google.com
http%3A%2F%2Fwww.google.com
$

-3
By: mohan43u
2009-06-14 20:34:37

What Others Think

The nature of the topic seems really technical and in case you have any idea what this was all about then coursework writing help can be of a great source of help for all of us so we would be able to get to know so much more now.
jamwak5 · 124 weeks and 1 day ago
The first phase the preparation should, theoretically, be uninfluenced by the intended intensity and duration of the sound which is subsequently produced. In fact, however, so quickly are the three phases accomplished that the pianist rarely has capacity to think, in performance, of each phase separately. Valentine week 2021
KayGasaway · 120 weeks and 2 days ago
Great Content. Happy New Year 2021 Is ahead and if you are planing for the best to make your new year 2021 more speical then you can get ideas from below links http://happynewyearduck.com/">Happy New Year 2021 http://happynewyearimagespics.com/">Happy New Year 2021 Images http://quotesforhappynewyear.com/">Quotes For Happy New Year 2021 Flocked Christmas Tree 2020
addamjohns · 116 weeks and 6 days ago
Free slots and free slots online games selected by professionals! Find the best payout casino358, free bonus online casino, and best real money slots games!
GeorgeMGleason · 114 weeks and 1 day ago
If Your Love your articles Tthanks for sharing. Also check Happy Chocolate Day 2021. https://happyvalentinesday2021.net/
framcheema · 110 weeks and 1 day ago
[url="https://happyvalentinesday2021.net"]happy chocolate day 2021[/url] is the best way to have a good day.
framcheema · 110 weeks and 1 day ago
happy chocolate day 2021
framcheema · 110 weeks and 1 day ago
Good technical information. It saves me a lot of time by using commands instead of doing the complete task. You can gain cool skills.Go to citizenship by investment dubai .Thanks for sharing this cool info.
DeVereGroup · 104 weeks and 4 days ago
Thanks for the post Best regards HowardDLaporte
HowardDLaporte · 100 weeks and 3 days ago
commandlinefu great platform
velvetyoung · 77 weeks and 2 days ago
Packers and Movers Noida to Bareilly Document thrilled along with the researching you will designed to makes precise put up impressive. Delightful adventure!
Geekstation · 48 weeks and 1 day ago
No matter what type of truck you have or what kind of problem you’re having, we can help. Semi Truck Air Brake Service
richardsrobinso · 24 weeks ago
Join now and start having fun with this fantastic game. spider solitaire 2 suit is a traditional card game with a novel way to play. You can play without engaging in cooperative play. activities that aid in the development and maturation of children's brains
Uchiha · 23 weeks and 4 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale pug puppies indiana Amazing! This blog looks just like my old one! It's on a completely different subject but it has pretty much the same layout and design. Wonderful choice of colors!
rahimhh21 · 21 weeks and 5 days ago
Since 2008, Perfect House Pug Puppies has been the leading Pug puppy breeder in the US, providing premium Pug puppies for sale. Each puppy exhibits the professionalism and knowledge that have set Perfect House Pug puppies apart from other pug puppy breeders. The professionals at Perfect House Pug Puppies are dedicated about finding their puppies loving, beloved homes where they can enjoy long, healthy lives. A companion that has been produced for quality, health, and temperament that satisfies the breed standard is guaranteed by Perfect House Pug puppies, the pug breeder that has set the benchmark for exceptional customer satisfaction. If you are looking to buy a baby pug, Black and white pugs, Mini pug puppies for sale, Black and tan pug for sale, Teacup pug puppies for sale, Female pug puppies, pug puppies for sale, pug puppies for sale near me, pug puppies for sale under $500 near me. Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies baby pug puppies for sale pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
Perfecthomepugs · 13 weeks and 4 days ago
Urlencode is a command line utility that encodes and decodes data. To get https://plumberswestauckland.co.nz/ and learn more new ways for plumber services. The encoding and decoding is done on UTF-8 encoded strings only, but it will also encode/decode blocks of characters at once if given the right arguments.
MariaPeter · 4 weeks and 5 days ago
For a long time me & my friend were searching for informative blogs, but now I am on the right place guys, you have made a room in my heart! gas stations near ez plumbing repair & services miami
gdsoomro · 1 week ago
Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Online Team Builders Reviews
seomind · 1 week ago
Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share. Online Team Builders Reviews
seomind · 1 week ago
I have read your article; it is very informative and helpful for me. I admire the valuable information you offer in your articles. Thanks for posting it. Silva Method Reviews
seomind · 1 week ago
I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you. Online Team Builders Reviews
seomind · 1 week ago
This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post. 4Life Review
seomind · 1 week ago
The blog and data is excellent and informative as well 4Life Review
seomind · 1 week ago
Your site is truly cool and this is an extraordinary moving article. Elite Marketing Pro Reviews
seomind · 1 week ago
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post . 4Life Review
seomind · 1 week ago
Thanks for providing recent updates regarding the concern, I look forward to read more. Elite Marketing Pro Reviews
seomind · 1 week ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: