summaryrefslogtreecommitdiff
path: root/printfurl
blob: 3da61a6adb405947ed5b339453a67e74124f3f35 (plain) (blame)
1
2
3
4
5
#!/bin/sh
cutargs="$(printf "%s\n" "$1" | tr '%' '\n' | tail -n+2 | sed 's/^\(.\).*/-\1/g')"
printfargs="$(printf "%s\n" "$1" | sed 's/%./%s/g')"
#printf "printfargs: %s\n" "$printfargs" 
cuturl $cutargs | tr '\n' ' ' | xargs -L1 printf "$printfargs"