From: Mike Frysinger Date: Wed, 4 Apr 2012 20:26:08 +0000 (-0400) Subject: support adding words on the cmdline X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6e2757111ca57e52f36369f9fdc5c8889f2eeafd;p=home.git support adding words on the cmdline --- diff --git a/.bin/aspell-sort-pws b/.bin/aspell-sort-pws index 36a1286..e95d6ae 100755 --- a/.bin/aspell-sort-pws +++ b/.bin/aspell-sort-pws @@ -2,10 +2,13 @@ set -ex cd ~/ file=".aspell.en.pws" -header=$(head -1 ${file}) -sed 1d ${file} | LC_ALL=en_US sort > ${file}.tmp +header=$(head -1 ${file} | sed 's: [0-9]* *$::') ( -echo ${header} +sed 1d ${file} +printf '%s\n' "$@" +) | LC_ALL=en_US sort -u | sed '/^[[:space:]]*$/d' > ${file}.tmp +( +echo "${header} $(wc -l ${file}.tmp | awk '{print $1}') " cat ${file}.tmp ) > ${file} rm ${file}.tmp