awk -F'=' '{ print $2 }' /nfs/logs/log.sec.2025-02-22 | awk -F'@' '{ print
$1"@" }' | sort | uniq
Slowly but surely, the set of one-liner AWK scripts continues to grow.
Is there a better way to write such AWK scripts ? or does one need to switch
something full-fledged like PERL, Python ?
If it stays one liner I think awk is fine, but in case you see this
increasing and if there is more play with regular expression I would
perhaps suggest Perl.
You could organise awk into .sh scripts as well as a full fledged
program but the issue is that it reaches it's limits soon as well and
the code doesn't look very readable after certain point.
Python only if you are too lazy to write a perl script or in case if
your perl script happens to grow as well.
Though at any point in time if a script is exceeding more than 10-20
lines of code, it is better to modularise.