DEV Community

loading...

Discussion on: Do you leave jokes in your code? If so, please share!

Collapse
oraclesean profile image
Oracle Sean ♠️

Is nawk installed?

function nawknawk () {
(nawk '{ print ; exit }' /etc/passwd) > /dev/null 2>&1
if [ ${?} -eq 0 ]
  then whosthere=nawk
  else whosthere=awk
fi
}