I'm comparing a table from two databases on two different servers to check for equality.
How do I use rlogin from a script , is it like this ?
rlogin -l $username $server1
where $username and $server1 are passed from the command line.
2.create a copy of that table, compress it and ftp it to a temp directory, my main issue is the rlogin but is what I have done so far correct regarding the following:
(snippet of code)
gzip -c flatFile > flatFile.gz
ftp -n <<EOF
open $host
user
$user
$password
put flatFile.gz
quit
EOF
Then I want to close rlogin is that done like this: ~.
There is no way to redirect password directly. You should use expect if you want to supply passwords to any script.
If you want to use rlogin, you will have to use .rhosts and add the entry for your system in that file. Alternatively you could use ssh and setup key-based authentication.