Re: cron and ssh
From: Chad Lemmen (chadl_at_lemmen.com)
Date: 07/30/04
- Previous message: Scott McMillan: "Re: Moving system from SCSII to IDE HDD"
- In reply to: Chad Lemmen: "Re: cron and ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 14:24:30 GMT
Chad Lemmen <chadl@lemmen.com> wrote:
> I can get it to work using the three commands below, but it would be nice
> to do it in just one command like you have above.
>
> #!/bin/sh
> scp linuxhost:parseshell/price.prn price.prn
> cat price.prn >> /path_on_sco/dtnprice.prn
> ssh linuxhost 'rm parseshell/price.prn'
I'm getting the "Select: invalid argument" error with the above commands
also, but the transfer does work so I guess that error has nothing to
do with the problem.
Some more testing has revealed this
ssh linuxhost 'cat parseshell/price.prn' >> /path_on_sco/dtnprice.prn
The above works on the command line. If I use the -n option on the
command line then /path_on_sco/dtnprice.prn is an empty file after
running the command.
ssh -n linuxhost 'cat parseshell/price.prn' >> /path_on_sco/dtnprice.prn
The -n option on ssh prevents reading from stdin. Now when cron runs the
script it doesn't matter if I used the -n option or not stdin is not read.
I think for this command to work I need stdin to be read so I guess it
just won't work with cron?
- Previous message: Scott McMillan: "Re: Moving system from SCSII to IDE HDD"
- In reply to: Chad Lemmen: "Re: cron and ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|