using awk imUsing awk, I'm trying to print $4 to the fourth field of an input line ($4) also at the begining of the line the.
I have tried the following code below prints, but it aboveprints the line the string is random so cant use string nameabove the line:
awk -F"[--]" '{print $4 ;print$0}' file i haveThe string is random so I can't use the string name.
The input like looks as follows:
/example-origin-live/ngrp:tennis-320-fd1d9b92-69e2-446c-a3e6-45b33a55efc9 withWith the code above iI get:
320 /example-origin-live/ngrp:tennis-320-fd1d9b92-69e2-446c-a3e6-45b33a55efc9 neededI need the output to look like:
320/example-origin-live/ngrp:tennis-320-fd1d9b92-69e2-446c-a3e6-45b33a55efc9 thanksThanks for help!