[net.bugs.4bsd] rsh eats # character

jeff@fluke.UUCP (Jeff Stearns) (04/06/84)

(The following comments apply to 4.2BSD.)

Suppose you were to type:
    % rsh foovax 'echo Here is a # mark'

Is the result a surprise?

Is this what you want, given that you might someday type:
    % rsh foovax 'lpr -#2 /tmp/foo'

Does this strike you as strange?  Is it a bug or a feature?
-- 
	Jeff Stearns       (206) 356-5064
	John Fluke Mfg. Co.
	P.O. Box C9090  Everett WA  98043  
	{uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!jeff

gwyn@brl-vgr.ARPA (Doug Gwyn ) (04/08/84)

I don't understand your complaint about behavior of # in rsh commands.
Shouldn't the command be interpreted the same way that it would be were
you to log in on the remote machine and type the command by hand?  # is
a comment character under appropriate circumstances (not in "lpr -#2").

kar@ritcv.UUCP (04/12/84)

This occurs when your shell on the remote machine is csh.  The reason it occurs
is that csh is invoked with the -c option to process a single command.  In
this mode, it does not think it is "interactive" (e.g. it does not read .login,
it thinks # begins a comment) and so behaves differently than when you really
log in to the remote machine and type the command in by hand.  The fix to this
is not in rsh but in csh, so that the -c option looks at the command in the
same way an interactive shell would.

	Ken Reek, Rochester Institute of Technology
	{allegra,seismo}!rochester!ritcv!kar

west@sdcsla.UUCP (04/30/84)

I'm surprised no one has mentioned this: all you need to do is
put a back-slash in front of the "#", as in:

	rsh poliovax 'echo now you \# see me'

which produces the desired effect.   The problem of how to treat
special characters will always be with (or against) us, I suspect.

			-- Larry West   UC San Diego, ICS/CSL
possible net addresses:
			-- ARPA:	west@NPRDC
			-- UUCP:	ucbvax!sdcsvax!sdcsla!west
			--	or	ucbvax:sdcsvax:sdcsla:west