HI Guys,
I have Below Input :-
RepigA_hteis522 ReptCfiEtrBsCll_aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
RepigA ReptCfiEtrBsCll
hteis522 aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
Split Data in two first row base on "_"
RudiC
2
Any attempt from your side?
---------- Post updated at 17:16 ---------- Previous update was at 17:14 ----------
Howsoever, try
awk '
NR==1 {T=$0
gsub (/_[^_ ]*($| )/, " ")
print
$0=T
gsub (/ [^_ ]*_/, " ")
}
1
' file
RepigA ReptCfiEtrBsCll
hteis522 aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
There are <TAB> chars in the gsub
regexes"
1 Like
Thanks ....But it still printing the same value.