Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PumpgunMessiah

    using curl with awk in command line/shell script

    You can use the "System" function to execute shell commands within AWK: cat urls.txt | awk '{ system("curl --remote-name " $0 }'
  2. PumpgunMessiah

    ASCII to Hex Conversion?

    Oh, and BTW I forgot to add the working URL Encoding function. But the mentioned script I want to use it for isn't finished yet. Why isn't there an edit post feature for already sent posts, so you don't have to answer your own posts do add something later [ponder] : BEGIN { for (i = 0 ; i <=...
  3. PumpgunMessiah

    ASCII to Hex Conversion?

    I'm not sure myself where that weird syntax with the apostrophe is coming from. I was just searching the web for as solution for my small problem and found this neat little trick, that sadly isn't working with AWK. But it seems it's indeed a specification of the "classic" printf, but it isn't...
  4. PumpgunMessiah

    ASCII to Hex Conversion?

    I forgot to add my small testing script (tested with OS X): #!/bin/sh teststr=$1 echo "$teststr" | awk -v dummy="'" ' function url_encode(rawURL) { cleanURL="" nonURLPos=match(rawURL,/[^[:alnum:]]/) while( nonURLPos > 0 ) { rawChar=substr(rawURL,nonURLPos,1) replaceChar=sprintf("%02x"...
  5. PumpgunMessiah

    ASCII to Hex Conversion?

    I'm in the midst of writing a rather quick and dirty URL Encoding function (replacing all specials characters with their hex value, i.e. 'http://www.url.com/test text.html' -> 'http://www.url.com/test%20text.html') via AWK and am struggling on this rather simple task. Well, it's rather easy...

Part and Inventory Search

Back
Top