diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-10 16:19:28 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-10 16:19:28 +1200 |
commit | 491d52c57de52a1cdb15a8ee8fb66d97cdc34612 (patch) | |
tree | b74b149a708f14610af4a88344329db7d78c85a7 /bin | |
parent | Force integer for dub(1df) limit (diff) | |
download | dotfiles-491d52c57de52a1cdb15a8ee8fb66d97cdc34612.tar.gz dotfiles-491d52c57de52a1cdb15a8ee8fb66d97cdc34612.zip |
Refactor urlh(1df) awk a bit
Diffstat (limited to 'bin')
-rw-r--r-- | bin/urlh.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/urlh.sh b/bin/urlh.sh index 5b5cab74..9f517fe9 100644 --- a/bin/urlh.sh +++ b/bin/urlh.sh @@ -17,13 +17,10 @@ unf | sd2u | # Use awk to find any values for the header case-insensitively -awk -v header="$header" ' -BEGIN { - FS=": *" - header = tolower(header) -} +awk -F ': *' -v header="$header" ' +BEGIN { header = tolower(header) } tolower($1) == header { - sub(/^[^ ]*: */, "") + sub(/^[^:]*: */, "") print } ' |