RosettaCodeData/Task/Read-entire-file/AWK/read-entire-file-1.awk
2015-02-20 00:35:01 -05:00

13 lines
272 B
Awk

#!/usr/bin/awk -f
BEGIN {
## empty record separate,
RS="";
## read line (i.e. whole file) into $0
getline;
## print line number and content of line
print "=== line "NR,":",$0;
}
{
## no further line is read printed
print "=== line "NR,":",$0;
}