in reply to Re: how to use perl variable in system command to run on unix
in thread how to use perl variable in system command to run on unix
Thanks Chromatic. I changed this line as said : my $files=system(qq(cd /waslogs1/vfoneLog/cposapp && ls -lrt | grep -i "$grep_date" | awk '{ print \$9 }' > /home/cpos/CRM_Reports/timelogic/filelist.txt)); Its working now. But can you explain me what was the problem with previous line.
And what if I use :my $cmd=q(cd /waslogs1/vfoneLog/cposapp && ls -lrt | grep -i "$grep_da +te" | awk '{ print $9 }' > /home/cpos/CRM_Reports/timelogic/filelist. +txt); my $files=system($cmd);
This is still not working
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to use perl variable in system command to run on unix
by Arunbear (Prior) on Sep 03, 2013 at 16:58 UTC | |
by tousifp (Novice) on Sep 03, 2013 at 17:28 UTC | |
by Laurent_R (Canon) on Sep 03, 2013 at 17:53 UTC | |
by tousifp (Novice) on Sep 04, 2013 at 11:57 UTC | |
by Arunbear (Prior) on Sep 04, 2013 at 09:50 UTC | |
by tousifp (Novice) on Sep 04, 2013 at 11:59 UTC |