This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Jim Nelson <address@hidden> >Organization: SSEC >Keywords: 200105242058.f4OKw9p09179 McIDAS-X shell scripts mcenv ssh rsh ------- Forwarded Message Date: Thu, 24 May 2001 15:56:05 -0500 To: tim Schmit <address@hidden>, address@hidden, address@hidden, geary callan <address@hidden>, joleen feltz <address@hidden>, address@hidden, fred wu <address@hidden>, jun li <address@hidden>, tony schreiner <address@hidden>, address@hidden, address@hidden From: Jim Nelson <address@hidden> Subject: rsh and ssh within mcenv subshells Hey all-- Just wanted to pass something along that might affect you if you use either the rsh or ssh commands within the McIDAS-X mcenv environment: Assume we have something like the following: mcenv << 'EOF' ssh command echo "We are here now..." EOF We were encountering a situation where an ssh command embedded within a mcenv session was causing a premature exit from the mcenv. In other words, we would never see the "We are here now..." echo to our screen. As it turns out, ssh receives information from the remote host via stdin, and this information then overwrites the remainder of the mcenv session that has already been read into stdin via the << construct. THE FIX: Use the -n flag with either the rsh or ssh commands, to suppress input from stdin. This then maintains the integrity of your mcenv session, and everything works as planned... Cheers! Sincerely, Jim Nelson ------- End of Forwarded Message