Using Plink and redirect output in bash script

1.6k views Asked by At

I've got problem, I've setup plink to create a connection to a BlueCoat device, retrieve the full configuration and redirect the output to a file.

The problem is, when I try it from the script, the output of plink is displayed on screen and not redirected to the file, but if I use the same exact command interactively, it works!

I've checked the file rights, etc. they all seem to be ok.

The way I use it is:

/usr/bin/plink -4 -batch -ssh -l <user> -pw <password> -m /tmp/bluecoat.backup <hostname> > output.txt

Any clues?

Kind regards,

Chris

0

There are 0 answers