NetBSD/distrib/sets/sort-list
kre 820e69dcc0 Simplify (and no need for sub-shells).
Same functionality, same method, simpler exposition.
2016-12-14 13:04:42 +00:00

8 lines
120 B
Bash
Executable File

#!/bin/sh
for F
do
{ grep '^#' "${F}"; grep -v '^#' "${F}" | LC_ALL=C sort ;} > "${F}".tmp
mv "${F}".tmp "${F}"
done