BASH
input: cat test
1 a;b;c;d 2 a;b;c;d 3 a;b;c;d
desired output is:
1 a 1 b 1 c 1 d 2 a 2 b 2 c
Solution 1st: Could you please try following.
awk -F'[ ;]' '{for(i=2;i<=NF;i++){print $1,$i}}' Input_file
Solution 2nd: Adding another awk too now.
awk
awk '{gsub(/;/,ORS $1 OFS)} 1' Input_file