Help with duplicate column 1 data

Input file

Q6GZV8  AY548484>AAT09676.1>YP_031595.1>2947737>CLSP2512393
P0C9E9  AY261366
P0C9K3  AY261361>IPR004848>PF01639
P0C9I4  AY261363>IPR004848

Desired output file

Q6GZV8  AY548484
Q6GZV8  AAT09676.1
Q6GZV8  YP_031595.1
Q6GZV8  2947737
Q6GZV8  CLSP2512393
P0C9E9  AY261366
P0C9K3  AY261361
P0C9K3  IPR004848
P0C9K3  PF01639
P0C9I4  AY261363
P0C9I4  IPR004848

">" is worked as separator in column 2.
Just hope that column 1 data will duplicate for each element that separator by ">" in column 2 into a new line.

Thanks

awk -F'[ \t>]*' '{for(i=2;i<=NF;i++) print $1,$i}' file
1 Like
awk -F "[> ]" '{ for (i=2;i<=NF;i++) {if($i !=""){ print $1,$i }}}' file
1 Like
awk '{gsub(/>/,RS $1 FS)}1' infile
2 Likes