diff options
author | epochqwert <epoch@hacking.allowed.org> | 2018-04-12 10:48:08 +0000 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2018-04-12 10:48:08 +0000 |
commit | 47eb00790cfe9badb8f08d4f3e7e3241f1f1649f (patch) | |
tree | 6acae03eb1026a4d68a7bda84b1e166048eec126 /printfurl | |
parent | 6827f6b8c2ee147f59642f3e3ebbc96f6164ecdc (diff) | |
download | uritools-47eb00790cfe9badb8f08d4f3e7e3241f1f1649f.tar.gz uritools-47eb00790cfe9badb8f08d4f3e7e3241f1f1649f.zip |
better format string cutting in printfurl and start now single-quote escapes the url before sending it to printf url
Diffstat (limited to 'printfurl')
-rwxr-xr-x | printfurl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,5 +1,5 @@ #!/bin/sh -cutargs="$(printf "%s\n" "$1" | tr '%' '\n' | tail -n+2 | grep '^[sukdPpqfU]' | sed 's/^\(.\).*/-\1/g')" +cutargs="$(printf "%s\n" "$1" | sed 's/%[^sukdPpqfU]//g' | tr '%' '\n' | tail -n+2 | sed 's/^\(.\).*/-\1/g' | tr '\n' ' ')" count="$(echo $cutargs | tr '-' '\n' | grep -c .)" printfargs="$(printf "%s\n" "$1" | sed 's/%[sukdPpqfU]/%s/g')" cuturl "$cutargs" | tr '\n' '\0' | xargs -n $count -0 printf "$printfargs" |