fix(script): sort-symbol-file script now overwrites the original by creating a backup file

This commit is contained in:
phaneron 2024-11-27 02:01:04 -05:00
parent e1bab2b375
commit cfb921e9fa

13
script/sort-symbol-file Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# this script just collects symbols into one file for convenience
if [ $# -eq 0 ]
then
echo "Select a file"
exit 1
fi
mv $1 "$1.bak"
awk 1 "$1.bak" | sort -k2 -t' ' > $1
rm "$1.bak"