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 <=...
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...
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"...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.