Re: OT: a problem about text manipulation
- From: Benjamin Franz <snowhare@xxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 07:03:42 -0800 (PST)
On Tue, 31 Oct 2006, Joe Klemmer wrote:
On Tue, 2006-10-31 at 03:05 -0800, Benjamin Franz wrote:
Assuming that what you *MEANT* for your output example was[...]]
the following Perl script should do it.
If I ever happen to get motivated I might try and do an awk script for
this. It's likely to be much simpler/smaller than the perl version
(though not necessarily any better, OC).
#!/usr/bin/perl -na
foreach my $i (@F) { ($i =~ m/^[0-9]+$/) ? $a = $i : print "$a $i\n" }
:)))
--
Benjamin Franz
Perl - A post-modern programming language or a
scripting tool gone horribly, horribly wrong?
-- Rob Malda
--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
- Follow-Ups:
- Re: OT: a problem about text manipulation
- From: Joe Klemmer
- Re: OT: a problem about text manipulation
- From: Benjamin Franz
- Re: OT: a problem about text manipulation
- References:
- OT: a problem about text manipulation
- From: Paul Smith
- Re: OT: a problem about text manipulation
- From: Benjamin Franz
- Re: OT: a problem about text manipulation
- From: Joe Klemmer
- OT: a problem about text manipulation
- Prev by Date: Re: Ethereal no FC6
- Next by Date: Re: NVidia from Livna seems to have broken X
- Previous by thread: Re: OT: a problem about text manipulation
- Next by thread: Re: OT: a problem about text manipulation
- Index(es):
Relevant Pages
|
|