help-gawk
[Top][All Lists]
Advanced

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

How to continue upon encountering nonexistent input files?


From: Peng Yu
Subject: How to continue upon encountering nonexistent input files?
Date: Fri, 25 Feb 2022 13:23:10 -0600

$ awk -e '{ print }' x.txt <(builtin printf '%s\n' {1..3})awk: fatal:
cannot open file `x.txt' for reading: No such file or directory

As shown above, the above command stops when a nonexistent file is
encountered. Is there a way to let awk keep on proceeding (but allows
a way to handle the error in the awk code, e.g., print a customized
error message)?

-- 
Regards,
Peng



reply via email to

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