On Sunday, October 6, 2002, at 03:47 AM, John W. Krahn wrote:
> $ perl -pe 's/^(\d+\s+)([a-zA-Z]+)\s+([a-zA-Z]+)$/$1$2;$3/' infile
> 222xxx;J
> 222www;DD
> 222cc;ffFFF
> 909eee;
> 909FFF;
> 909j;
> 888JJJ;
> 888HHH;
>
>
> This _will_ wo
On Sat, Oct 05, 2002 at 10:32:55PM -0400, Paul Van Dalen wrote:
> Actually, Paul J., I thought the whole point of this board was to enhance
> one's knowledge.
Good. That's what I thought too.
> Sure, I could probably get it done with the very limited
> knowledge I have in a v
Paul,
Try this. it is pretty easy
while () {
print "$1 $2;$3\n" if $_ =~ /^(\d+)\s+(\w+)\s+(\w+)$/;
}
__DATA__
222xxxJ
222wwwDD
222ccffFFF
909eee
909FFF
909j
888JJJ
888HHH
Anidil Patinatiyil Rajend
Actually, Paul J., I thought the whole point of this board was to enhance
one's knowledge. Sure, I could probably get it done with the very limited
knowledge I have in a very convaluted fashion, but I suspected there was a
much easier way to do it. But thanks for your concern.
Peckerhead.
"Pa
James Edward Gray II wrote:
>
> On Saturday, October 5, 2002, at 06:02 PM, Paul Van Dalen wrote:
> >
> > Given this input:
> >
> > 222xxxJ
> > 222wwwDD
> > 222ccffFFF
> > 909eee
> > 909FFF
> > 909j
> > 888JJJ
> > 888
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:
>
> 222xxxJ
> 222wwwDD
> 222ccffFFF
> 909eee
> 909FFF
> 909j
On Sat, Oct 05, 2002 at 07:02:09PM -0400, Paul Van Dalen wrote:
> Hi Gang,
>
> Given this input:
>
> 222xxxJ
> 222wwwDD
> 222ccffFFF
> 909eee
> 909FFF
> 909j
> 888JJJ
> 888HHH
>
> I'd like to split the
Hi Gang,
Given this input:
222xxxJ
222wwwDD
222ccffFFF
909eee
909FFF
909j
888JJJ
888HHH
I'd like to split the input, group it by the first column, and, for that
group, print out a concatenated second col