I have an input text file that looks like:
\\awpvcp01
Rev 1.7
Last modified:
\\awpvcp01
Rev 1.6
Last modified:
I am trying AWK to get this output:
\\awpvcp01 Rev 1.7 Last modified:
\\awpvcp01 Rev 1.6 Last modified:
Am I trying to make this harder than it should be? Here is my attempt:
awk 'BEGIN {
FS="\n"
RS=""
i=0
x=1
y=2
z=3
{do
{print "TEST",$(NF-(NF-x)),$(NF-(NF-y)),$(NF-(NF-z))
i++
x=x+3
y=y+3
z=z+3}
while (i<NF)}}'
Major problem is that I don't know how to get the input file to be read or the output file to be generated. Any help would be appreciated.
\\awpvcp01
Rev 1.7
Last modified:
\\awpvcp01
Rev 1.6
Last modified:
I am trying AWK to get this output:
\\awpvcp01 Rev 1.7 Last modified:
\\awpvcp01 Rev 1.6 Last modified:
Am I trying to make this harder than it should be? Here is my attempt:
awk 'BEGIN {
FS="\n"
RS=""
i=0
x=1
y=2
z=3
{do
{print "TEST",$(NF-(NF-x)),$(NF-(NF-y)),$(NF-(NF-z))
i++
x=x+3
y=y+3
z=z+3}
while (i<NF)}}'
Major problem is that I don't know how to get the input file to be read or the output file to be generated. Any help would be appreciated.