Home / How to set the variable $PATH when executing the csh via rsh

How to set the variable $PATH when executing the csh via rsh

In CentOS 7, add setenv PATH <PATH string, use \: to split> when executing the csh command as below.

[testuser@centos7~]$ rsh remotehost 'echo $PATH'
/usr/bin:/bin
[testuser@centos7 ~]$ rsh remotehost 'setenv PATH /usr/bin\:/bin\:/opt;echo $PATH'
/usr/bin:/bin:/opt

Leave a Reply