perl -pe 's/^(\d+\s+)([a-zA-Z]+)\s+([a-zA-Z]+)$/$1$2;$3/' infile >outfile
On Saturday, October 5, 2002, at 06:02 PM, Paul Van Dalen wrote: > Hi Gang, > > Given this input: > > 222 xxx JJJJJ > 222 www DD > 222 cc ffFFF > 909 eee EEEE > 909 FFF kkkk > 909 jjjjj KKKK > 888 JJJ HHHH > 888 HHH JJJJ > > I'd like to split the input, group it by the first column, and, for > that > group, print out a concatenated second column. The output should look > thusly: > > 222 xxx;www;cc > 909 eee;FFF;jjjjj > 888 JJJ;HHH > > Many thanks, > > Paul > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]