bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] Is there a way to get the current file number?


From: Peng Yu
Subject: [bug-gawk] Is there a way to get the current file number?
Date: Wed, 3 Apr 2019 14:25:21 -0500

Hi,

FILENAME only gives the filename. Is there a way to get the file number? Thanks.

$ echo 1 > /tmp/1.txt
$ awk -e '{ print FILENAME, $0 }' /tmp/1.txt  /tmp/1.txt
/tmp/1.txt 1
/tmp/1.txt 1

-- 
Regards,
Peng



reply via email to

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