]> git.wh0rd.org - home.git/blame_incremental - .bin/aspell-sort-pws
git-repack: create .git/refs/
[home.git] / .bin / aspell-sort-pws
... / ...
CommitLineData
1#!/bin/bash
2set -ex
3cd ~/
4file=".aspell.en.pws"
5header=$(head -1 ${file} | sed 's: [0-9]* *$::')
6(
7sed 1d ${file}
8printf '%s\n' "$@"
9) | LC_ALL=en_US sort -u | sed '/^[[:space:]]*$/d' > ${file}.tmp
10(
11echo "${header} $(wc -l ${file}.tmp | awk '{print $1}') "
12cat ${file}.tmp
13) > ${file}
14mv ${file}.tmp ".config/google-chrome/Custom Dictionary.txt"