Please help with BASH script

:cool: hi ! :frowning:

i m writting a Bash script that does remote shell to from Unix server to other server. here is the line that does not work :
rsh $host setenv TERM=$term ; sudo crontab -e

if i don t specifie "setenv TERM=$term" it does the rsh to the $host and open vi in Open mode ! and i don t want it in open mode - the environment at $host is csh.
if i don t specifie "setenv...." it does rsh but it doesn t open crontab at the destination $host , it disconnect the session and open crontab at the host from where i run the script !

Karine
thanks for help !!!

Try:
rsh $host "setenv TERM=$term ; sudo crontab -e"

it still starts vi in open mode