diff options
author | epoch <epoch@enzo.thebackupbox.net> | 2021-11-14 04:26:25 +0000 |
---|---|---|
committer | epoch <epoch@enzo.thebackupbox.net> | 2021-11-14 04:26:25 +0000 |
commit | a0ef1e229f20ea97d5538c8c4a8f1b6045af0c0c (patch) | |
tree | d4bf05ad846af0f6a22c49a8ac50cf24a01b96fa /urigetline | |
parent | e43385e2cd39e7f31d594b348228d62b41515a68 (diff) | |
download | uritools-a0ef1e229f20ea97d5538c8c4a8f1b6045af0c0c.tar.gz uritools-a0ef1e229f20ea97d5538c8c4a8f1b6045af0c0c.zip |
urimatchpairs is new, urigetline got rewritten in C and WEW is it fast now. compare with .sh version.
Diffstat (limited to 'urigetline')
-rwxr-xr-x | urigetline | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/urigetline b/urigetline deleted file mode 100755 index 3f6bb51..0000000 --- a/urigetline +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -uri="$1" -### old way. -# line="$(grep "^${scheme}:" ~/.config/uristart.conf | cut -d: -f2- | sed 's/^[ \t]*//g' | sed 's/\\/\\\\/g')" - -if [ ! "$uristart_config" ];then - uristart_config=~/.config/uristart.conf -fi - -### fancy way. -grep '^[^#]' "$uristart_config" \ - | while read -r l;do - uritmp="$uri" - uritmp="$(printf "%s\n" "$l" \ - | cut -d: -f1 \ - | tr ' ' '\n' \ - | paste '-d ' - - \ - | while read -r a b;do - uritmp="$(printf "%s\n" "${uritmp}" | urimatch "$a" "$b")" - printf "%s\n" "$uritmp" - done | tail -n1)" - if [ "$uritmp" ];then - printf '%s\n' "$l" - break - fi - done \ - | cut -d: -f2- \ - | sed 's/^[ \t]*//g' \ - | sed 's/\\/\\\\/g' |