diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-21 09:28:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-21 09:28:33 +1200 |
commit | 81ac09782b24ceff210037f6b3d8a68f3f6baf1f (patch) | |
tree | aed8c7825ab7726bcf5ccadbfb6c36d4afc6929b /bin | |
parent | Test for required programs (diff) | |
download | dotfiles-81ac09782b24ceff210037f6b3d8a68f3f6baf1f.tar.gz dotfiles-81ac09782b24ceff210037f6b3d8a68f3f6baf1f.zip |
Move locale export to top of script
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/htmlurls | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/htmlurls b/bin/htmlurls index fc13bac8..23dc7dcc 100755 --- a/bin/htmlurls +++ b/bin/htmlurls @@ -8,6 +8,10 @@ # License: Public domain # +# Set a sensible locale so that sort(1) doesn't act dumbly +LANG=C.UTF-8 +export LANG + # Check we have the programs we need hash pup || exit @@ -17,7 +21,5 @@ cat -- "${@:-/dev/stdin}" | ## shellcheck disable=SC2002 # Pipe it through a pup filter to get all the values of the a href elements pup 'a attr{href}' | -# Sort it; use a plain locale to force a proper bytewise sort so that -# punctuation is not ignored -LANG=C.UTF-8 sort | # skipping punctuation in a locale sort is unacceptable -uniq +# Sort it uniquely +sort | uniq |