Hi,
I am new to awk, and am attempting some practice scripts; I wish to use the getline function, however no matter how simple the example is, I cannot get it to run. Instead I get something like;
awk: syntax error near line 2
awk: illegal statement near line 2
This is the script I am running; does anybody have any suggestions?
awk '{
getline < "secondary.input"
print
}'
I am new to awk, and am attempting some practice scripts; I wish to use the getline function, however no matter how simple the example is, I cannot get it to run. Instead I get something like;
awk: syntax error near line 2
awk: illegal statement near line 2
This is the script I am running; does anybody have any suggestions?
awk '{
getline < "secondary.input"
}'