I have a line like:
one:two:three:four:five:six seven:eight
and I want to use awk
to get $1
to be one and $2
to be two:three:four:five:six seven:eight
I know I can get it by doing sed
before. That is to change the first occurrence of :
with sed
then awk
it using the new delimiter.
However replacing the delimiter with a new one would not help me since I can not guarantee that the new delimiter will not already be somewhere in the text.
I want to know if there is an option to get awk
to behave this way
So something like:
awk -F: '{print $1,$2}'
will print:
one two:three:four:five:six seven:eight
I will also want to do some manipulations on $1
and $2
so I don't want just to substitute the first occurrence of :
.