From 07a8ef9e92904678df329ede995a459ae252adbf Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 23 Jul 2024 09:01:02 +0300 Subject: (csg) Improved awk command searching --- csg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/csg b/csg index 72c7031..1a6082d 100755 --- a/csg +++ b/csg @@ -82,9 +82,14 @@ isCommand() { if [ -n "$CSG_AWK" ] then : -elif isCommand 'gawk' -then - CSG_AWK='gawk --posix' +elif isCommand 'gawk' # GNU awk +then CSG_AWK='gawk --posix' +elif isCommand 'mawk' # Fast byte-code interpreter awk (by Mike Brennan) +then CSG_AWK='mawk -W posix' +elif isCommand 'nawk' # One true awk (by Brian Kernighan) +then CSG_AWK='nawk' +elif isCommand 'awk' # Original or other awk +then CSG_AWK='awk' else echo '[Error] Couldn'\''t find an awk implementation!' csg_help 4 -- cgit v1.3.1-26-gb76a