on tue NUMBER aug NUMBER david neary wrote actually the following would be in some way sensible echo e echo enc sed s NUMBER NUMBERa fa f NUMBER NUMBER x NUMBER g why NUMBER NUMBER why not NUMBER no idea the above was something along the lines i was attempting once i realised it was a straight swap but i couldnt get awk s gensub to insert the x for s and s anyway in the end i found something on the internet and adapted it function decode_url str hextab i c cNUMBER cNUMBER len code hex to dec lookup table hextab NUMBER NUMBER hextab NUMBER NUMBER hextab NUMBER NUMBER hextab NUMBER NUMBER hextab NUMBER NUMBER hextab a NUMBER hextab NUMBER NUMBER hextab b NUMBER hextab NUMBER NUMBER hextab c NUMBER hextab NUMBER NUMBER hextab d NUMBER hextab NUMBER NUMBER hextab e NUMBER hextab NUMBER NUMBER hextab f NUMBER decoded i NUMBER len length str while i len c substr str i NUMBER check for usual start of uri hex encoding chars if c c if i NUMBER len valid hex encoding cNUMBER toupper substr str i NUMBER NUMBER cNUMBER toupper substr str i NUMBER NUMBER if hextab cNUMBER hextab cNUMBER code NUMBER hextab cNUMBER NUMBER hextab cNUMBER NUMBER c sprintf c code i i NUMBER is space apparently else if c c decoded decoded c i return decoded cheers dave ps the late reply is because the footer on the original mail if you received this mail in error yadda yadda got caught in my spam filter and ended up in my junkmail directory he he might not have been the footer check my headers regards paul jakma paul URL paul URL key id NUMBERaNUMBERffNUMBERa warning do not ever send email to spam URL fortune one nuclear bomb can ruin your whole day irish linux users group ilug URL URL for un subscription information list maintainer listmaster URL 