From 6f402e2d2f052972886712f60d592684c8671982 Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 20 Apr 2019 05:32:27 -0500 Subject: rebased on an old copy of this repo. renamed everything. rewrote the uri parser. added uricmp. wew. --- uriprintf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 uriprintf (limited to 'uriprintf') diff --git a/uriprintf b/uriprintf new file mode 100755 index 0000000..f79d067 --- /dev/null +++ b/uriprintf @@ -0,0 +1,5 @@ +#!/bin/sh +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')" +uricut "$cutargs" | tr '\n' '\0' | xargs -n $count -0 printf "$printfargs" -- cgit v1.2.3