0

following works:

$ ssh $host crontab -l| grep myjob

but if I want to store it in a variable it grabs everything in the current folder of local host with the result from remote server in the end. confused why so???

$ x=`ssh $host crontab -l| grep myjob`
$ echo $x
...blah ..blah... ...myjob.

for example below works fine:

x=`ssh $host pwd`
echo $x

(properly displays remote pwd)

rajeev
  • 1,075
  • 6
  • 23
  • 42

0 Answers0