Hi,
I am vey new to awk. I need somebody either write or give a tip how to write a script. The script should do the following. It reads a text file which has entries like this
"val1" "val2"
"val3" "val4"
and so on....
the val1, val3 .... fields are positioned 1 to 32
the val2, val4 .... fields are positioned 33 to 259
I want to read val1 first and concatenate with some command and write to a file as first line
then the next line of the file will have another command concatenated with val2
then the next line of the file will have another command concatenated with val1 again
and so on ........... till the end of the file.
The output file will be like this
command val1 command
command val2 command
command val1 command
command val3 command
command val4 command
command val3 command
and so on .......
Can anybody help me?
I am vey new to awk. I need somebody either write or give a tip how to write a script. The script should do the following. It reads a text file which has entries like this
"val1" "val2"
"val3" "val4"
and so on....
the val1, val3 .... fields are positioned 1 to 32
the val2, val4 .... fields are positioned 33 to 259
I want to read val1 first and concatenate with some command and write to a file as first line
then the next line of the file will have another command concatenated with val2
then the next line of the file will have another command concatenated with val1 again
and so on ........... till the end of the file.
The output file will be like this
command val1 command
command val2 command
command val1 command
command val3 command
command val4 command
command val3 command
and so on .......
Can anybody help me?