goldenradium2001
Technical User
Can anyone help me on this syntax? Here's my file called file1:
one two three
four five six
seven eight nine
First, I execute this command:
nawk '{print $1, $2 > "output"}' file1
The contents of the output file is:
one two
four five
seven eight
Next I execute this command:
nawk '{print $3 >> "output"}' file1
The contents now of the output file are:
one two
four five
seven eight
three
six
nine
How do I make it so that the column $3 is actually appended to the right of the first and second columns?
Thanks!
one two three
four five six
seven eight nine
First, I execute this command:
nawk '{print $1, $2 > "output"}' file1
The contents of the output file is:
one two
four five
seven eight
Next I execute this command:
nawk '{print $3 >> "output"}' file1
The contents now of the output file are:
one two
four five
seven eight
three
six
nine
How do I make it so that the column $3 is actually appended to the right of the first and second columns?
Thanks!