Owen wrote:
You need to run something like this. Adapt to your requirements
#!/usr/bin/perl -w
use strict;
while () {
my $line = $_;
if ( $line =~ /QQQ/ ) {
my @bits = split;
print "$bits[$#bits -1]\n";
On Nov 21, 4:47 pm, [EMAIL PROTECTED] (Owen) wrote:
> On Fri, 21 Nov 2008 03:41:21 -0500
>
>
>
>
>
> "michael spellman" <[EMAIL PROTECTED]> wrote:
> > On Thu, Nov 20, 2008 at 8:32 PM, Owen <[EMAIL PROTECTED]> wrote:
>
> > > On Thu, 20 Nov 2008 06:32:51 -0800 (PST)
> > > marys <[EMAIL PROTECTED]> wr
On Nov 20, 4:58 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> marys wrote:
> > Hello:
>
> Hello,
>
> > Does anyone know how to use ‘awk’ in a script?
>
> perl and awk have a lot of similar features so its usually preferable to
> use perl in a perl program instead of awk.
>
> > It must have a
> > d
On Fri, 21 Nov 2008 03:41:21 -0500
"michael spellman" <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 20, 2008 at 8:32 PM, Owen <[EMAIL PROTECTED]> wrote:
>
> > On Thu, 20 Nov 2008 06:32:51 -0800 (PST)
> > marys <[EMAIL PROTECTED]> wrote:
> > I am not altogether certain what you are trying to achieve.
On Thu, 20 Nov 2008 06:32:51 -0800 (PST)
marys <[EMAIL PROTECTED]> wrote:
> Hello:
> Does anyone know how to use ‘awk’ in a script? It must have a
> different syntax than the unix analog, as does the ‘grep’ command.
> For grep, the syntax in the c-shell is:
> “grep ‘string’ , but for Perl the del
marys wrote:
Hello:
Hello,
Does anyone know how to use ‘awk’ in a script?
perl and awk have a lot of similar features so its usually preferable to
use perl in a perl program instead of awk.
It must have a
different syntax than the unix analog, as does the ‘grep’ command.
For grep, the s
Hello:
Does anyone know how to use ‘awk’ in a script? It must have a
different syntax than the unix analog, as does the ‘grep’ command.
For grep, the syntax in the c-shell is:
“grep ‘string’ , but for Perl the delimiters are slashes: $x = grep /
string/ line.
Maybe the same thing is going on with