From cfb921e9fa27d1ba3f27e2a1a1166be3b6061cb8 Mon Sep 17 00:00:00 2001 From: superp00t Date: Wed, 27 Nov 2024 02:01:04 -0500 Subject: [PATCH] fix(script): sort-symbol-file script now overwrites the original by creating a backup file --- script/{sort-file => sort-symbol-file} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename script/{sort-file => sort-symbol-file} (70%) diff --git a/script/sort-file b/script/sort-symbol-file similarity index 70% rename from script/sort-file rename to script/sort-symbol-file index 2601742..53b9346 100644 --- a/script/sort-file +++ b/script/sort-symbol-file @@ -8,4 +8,6 @@ if [ $# -eq 0 ] exit 1 fi -awk 1 $1 | sort -k2 -t' ' \ No newline at end of file +mv $1 "$1.bak" +awk 1 "$1.bak" | sort -k2 -t' ' > $1 +rm "$1.bak" \ No newline at end of file