Hi all,
in an awk script do you know if is possible to give a value from a "unix output command" to a variable?
I know that in a shell script I can give a value to a variable from a command output in this way:
In example: var1=`tail -1 InputFile.txt`
I need to do that in an awk script, so I'm thinking somenthing like this:
syscommand = "tail -1" InputFile "
var1 = system(syscommand)
but it doesn't work.
Do you have any suggestions?
Thanks
Piero
in an awk script do you know if is possible to give a value from a "unix output command" to a variable?
I know that in a shell script I can give a value to a variable from a command output in this way:
In example: var1=`tail -1 InputFile.txt`
I need to do that in an awk script, so I'm thinking somenthing like this:
syscommand = "tail -1" InputFile "
var1 = system(syscommand)
but it doesn't work.
Do you have any suggestions?
Thanks
Piero