通过rsh或ssh在远端机器执行命令的时候,有时需要直到远端机器上运行的Shell是哪一种?是C Shell还是Bash Shell ?
eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null \ && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; \ setenv PARALLEL_PID '$PARALLEL_PID' \ || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; \ PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ; tty > /dev/null && stty isig -onlcr -echo; echo hello;
tty
: Print the file name of the terminal connected to standard inputstty
: Print or change terminal characteristics.
isig
: enable interrupt, quit, and suspend special characters-onlcr
: disable translate newline to carriage return-newline-echo
: disable echo input characters