[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Awk gets stucked if no filename

From: Xavier Martínez Serrano
Subject: [bug-gawk] Awk gets stucked if no filename
Date: Wed, 29 Nov 2017 13:38:33 +0100


I'm not sure whether this is a bug or not, but at least is not the behaviour from standard Linux commands. If I add a pattern code but no filename to parse, awk gets stucked waiting:

$ awk '{print("hi")}'  $f
... <neverending wait>

This is a problem when awk is used within shell scripts where the filename is supplied via a shell var. In case the filename is empty, the shellscript never ends.

To my understanding if awk cant find the file should issue an "exit(1)".

Many thanks in advance, greetings,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]