Regards.../om
On 15-May-2012, at 18:23, Bob McConnell wrote:
>> From: Sunita.Pradhan
>>
>>I want to print the command during script execution .
>> Example :
>>
>>
>> ===
>> $ls = `ls`;
>>
>> Print "$ls\n";
>> ==
>>
>> In the above script I w
> From: Sunita.Pradhan
>
> I want to print the command during script execution .
> Example :
>
>
> ===
> $ls = `ls`;
>
> Print "$ls\n";
> ==
>
> In the above script I want to print "ls" command before 'ls' command gets
> executed . Like "set -x"
On Tue, May 15, 2012 at 07:40:44AM -0400, sunita.prad...@emc.com wrote:
> Hi
>
> I want to print the command during script execution .
> Example :
>
> ===
> $ls = `ls`;
>
> Print "$ls\n";
> ==
A straightforward way to do this is to run your script
Hi Sunita,
On Tue, 15 May 2012 07:40:44 -0400
wrote:
> Hi
>
> I want to print the command during script execution .
> Example :
>
>
> ===
> $ls = `ls`;
>
> Print "$ls\n";
> ==
>
I should note that trapping the output of "ls" is pretty silly
It is working for one line program . How can we implement in a script ?
-Sunita
-Original Message-
From: CloudWebDNS.com [mailto:supp...@cloudwebdns.com]
Sent: Tuesday, May 15, 2012 5:27 PM
To: beginners@perl.org
Subject: Re: how to display commands while perl script executing
Hello
Hello,
Try this:
$ perl -le '$c="ls -l";print $c;system $c'
ls -l
total 16
drwxr-xr-x 4 pyh pyh 4096 2012-05-12 17:08 backup
drwxr-xr-x 2 pyh pyh 4096 2012-05-13 08:29 bin
drwxr-xr-x 5 pyh pyh 4096 2012-05-03 11:03 ipdata
drwxr-xr-x 4 pyh pyh 4096 2012-05-14 10:34 tmp
Hi
I