more idiomatic awk FML

This commit is contained in:
4am 2021-10-22 16:04:14 -04:00
parent dff889fb59
commit a6454ae6af
2 changed files with 3 additions and 3 deletions

View File

@ -49,11 +49,11 @@ dsk: asm
#
# create distribution version of GAMES.CONF without comments or blank lines
#
awk '!/^$$|^#/ { print }' < res/GAMES.CONF > build/GAMES.CONF
awk '!/^$$|^#/' < res/GAMES.CONF > build/GAMES.CONF
#
# create a sorted list of game filenames, without metadata or display names
#
awk -F "," '{ print $$2 }' < build/GAMES.CONF | awk -F "=" '{ print $$1 }' | sort > build/GAMES.SORTED
awk -F, '/,/ { print $$2 }' < build/GAMES.CONF | awk -F= '{ print $$1 }' | sort > build/GAMES.SORTED
#
# precompute indexed files for prelaunch
# note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch

View File

@ -39,7 +39,7 @@ fi
# make temp file with list of lines that contain keys
records=$(mktemp)
awk '!/^$|^#|^\[/ { print }' < "$1" > "$records"
awk '!/^$|^#|^\[/' < "$1" > "$records"
# make temp assembly source file that represents the binary OKVS data structure
source=$(mktemp)