Hi I have a file which has lines as below ( below is a single sample line)
Running Test File:
/home/rsc_app|06_2BIN/08_payfacil/01_5BIN/003_nt2bnet_Acq004601_0100_0420_mc.utt|Test
Result | Pass | MIG_NT2_EP2 CIS_EP1|0403319|
what i am trying to achieve is match the
/003_nt2bnet_Acq004601_0100_0420_mc.utt
and change the / as | so the outcome to be ( the text before .UTT can be anything basically it is a file name and .utt is the extension so i want to find the pattern to match .utt and replace the / to |)
|003_nt2bnet_Acq004601_0100_0420_mc.utt
the whole line to be
Running Test File:
/home/rsc_app|06_2BIN/08_payfacil/01_5BIN|003_nt2bnet_Acq004601_0100_0420_mc.utt|Test
Result | Pass | MIG_NT2_EP2 CIS_EP1|0403319|
I have tried so many regexp to match but not able to do so . the last one which I tried was as below
awk -F["|"] '{if($3~/\/.+?(?=utt)/){sub(/\//,"|",$0)}} {print $0}'
any help would be greatly appreciated.