Re: help with awk command in perl



you have to execute the awk statement on the operating system level
with the system,
that is:

system ("$cmd1");


On Aug 29, 2006, at 10:40 AM, Sayed, Irfan ((Irfan)) wrote:

Hi All,

I have a following script in perl in which i am using awk command but it
is not getting executed properly.


# /usr/atria/bin/Perl -w

use strict;
use warnings;

my $fname = "/tmp/checkvob_log";
open(FILE,">>$fname");


my $CT = "/usr/atria/bin/cleartool";

my @vob_list = `$CT lsvob -s`;

my @vob_list1 = `$CT lsvob`;

print FILE @vob_list1;

my $cmd1 = "awk '{print $3}' /tmp/checkvob_log";

my @vob_path = qx{$cmd1};

print @vob_list;
print @vob_path;


can anybody please help.

Regards
Irfan.


.



Relevant Pages

  • Re: New Application Extension reports 404
    ... You actually want .RUN to be handled by Perl, ... please add a Web Service Extension ... /command1.run will execute Perl script1.pl ... but IIS4 had the "RUN" extension mapped to execute a predefined perl script. ...
    (microsoft.public.inetserver.iis)
  • Re: Talk about text files and embedded malware...
    ... | ASCII characters only. ... | script or VBS script)? ... Say a file called "bad.txt" contains some perl script. ... user double-clicking a bad file will execute some code? ...
    (alt.comp.anti-virus)
  • Re: Linux
    ... You almost certainly have Perl already installed. ... But the actual command line interpreter should be the same between them. ... put the shebang line as the first line of the script. ... You can then execute the program ...
    (perl.beginners)
  • Re: Executing scripts using C#
    ... You can simply call the Perl interpreter from your program and pass the *.pl ... files you want to execute as parameter. ... .cs files with some block as <Script> like we do in HTML? ... > public void invokeScript() ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Memory: measuring 5 limitations
    ... >> This will give you information about the execution of the script. ... > Yeah I have shell access and I can execute the time command. ... If you can execute your script *without* typing in perl at the ...
    (comp.lang.perl.misc)