VIP*_*MAR 6

试试这个 -

awk '{print $0,NR}' OFS=";" f
a;b;c;1
a;b;v;2
a;b;f;3
Run Code Online (Sandbox Code Playgroud)