The fact that your "log_std_depot" log file is showing two slashes in a row indicates that you are not setting $i. Apart from that, if you take the command line string from that log file ("/usr/sbin/swlist -l depot @ sidedepot.fc.com") and run it manually in a shell, what happens?
If you make changes in the command string in order to get it to work in the shell, just make sure you apply the same changes in the perl script. | [reply] |
I replaced $i with 1111 and ran the perl script, still I am getting below lines in
the output file. Its not actually getting executed.
COMMAND: /usr/sbin/swlist -l depot @ sidedepot.fc.com ## FILTERS: 0909
/ 1111 / AR
However if I run the same command on command line, its working fine.
I am using the below command in the command line.
/usr/sbin/swlist -l depot @ sidedepot.fc.com | grep 0909 | grep 1111 | grep AR
In the script, we are not using grep, could this be the reason
next unless ( /$rel_string/ and /$i/ and /AR/ ) ?????
| [reply] |
Hi graff,
The below code is not working.
next unless ( /$rel_string/ and /$i/ and /AR/ );
If i give only
next unless ( /$rel_string/ ), it works fine.
| [reply] |