anyone could help me to achieve this ,normally AWK read file
a b c
as
$1:a
$2:b
$3:c
how to read this file
a
b
c
as
$1:a
$2:b
$3:c
Many thanks for help .
anyone could help me to achieve this ,normally AWK read file
a b c
as
$1:a
$2:b
$3:c
how to read this file
a
b
c
as
$1:a
$2:b
$3:c
Many thanks for help .
Using GNU awk for multi-char RS:
Note the difference wrt
d
with Tom's solution of setting RS to the NULL string:Think about how you want your script to behave if there are blank lines in the file.
You can unset the Record Separator and change the Input Field Separator to the newline character: