hveneticus has asked for the wisdom of the Perl Monks concerning the following question:
This code works fine for me. But, for my happiness, someone put some characters (let's say: XXXXX) before "AAA=" string. So I arranged my code differently:... my $regexpaaa=qq/-i -e \'\^AAA=\'/; my @command2 = ("ssh us\@ip -o BatchMode=yes grep $regexpaaa $dir/$fil +e"); ...
But this time, it doesn't work. ssh command or perl aren't able to interpret correctly the second regexp. The error is: "grep: AAA=: No such file or directory"... my $regexpaaa=qq/-i -e \'\^AAA=\'/ -e \'\^XXXXX\ AAA=\'/; my @command2 = ("ssh us@pp -o BatchMode=yes grep $regexpaaa $dir/$file +"); ...
Thank you very very much.
Hveneticus.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl, ssh and grep
by salva (Canon) on Jun 09, 2017 at 08:02 UTC | |
|
Re: perl, ssh and grep
by marinersk (Priest) on Jun 08, 2017 at 23:29 UTC | |
|
Re: perl, ssh and grep
by thanos1983 (Parson) on Jun 08, 2017 at 22:29 UTC | |
|
Re: perl, ssh and grep
by LanX (Saint) on Jun 08, 2017 at 21:41 UTC | |
|
Re: perl, ssh and grep
by hveneticus (Novice) on Dec 15, 2017 at 15:55 UTC |