Hi friends,
I am using Perl Tk for a GUI application. It uses a telnet part wherin I need to login to a unix machine, execute a command and process the result.
The code is as follows :
my $result = $t->cmd(("grep - $filename.txt~ | wc -l | awk '{print $1}'"));
I am basically searching for '-" in the $filename.txt~.
The problem i am having is, the result always comes as 1 .. even thou the file does not contain any '-' symbol.
The command runs fine when used directly on unix.
Would appreciate if any one of you can help me out.
Regards,
Alex