bug-gawk
[Top][All Lists]
Advanced

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

How to read stdin as well as files?


From: Peng Yu
Subject: How to read stdin as well as files?
Date: Fri, 28 Feb 2020 11:21:27 -0600

The following example shows that when files are specified, stdin will
not be read.

What is the best way to first read stdin then read the files (knowing
where the data is from)? Thanks.

$ seq 3 | awk -e '{ print FILENAME, $0 }' <(printf '%s\n' {a..c})
<(printf '%s\n' {A..B})
/dev/fd/63 a
/dev/fd/63 b
/dev/fd/63 c
/dev/fd/62 A
/dev/fd/62 B

-- 
Regards,
Peng



reply via email to

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