Csh null strings

liberte at uiucdcsb.CS.UIUC.EDU liberte at uiucdcsb.CS.UIUC.EDU
Wed Nov 13 16:46:00 AEST 1985



There are at least two different-sized null strings in csh.
But sometimes they are equal anyway.

	% set x = ""
	% set y = "`echo`"
	% echo $#x $#y
	1 0

	% set x = 
	% set y = `echo`
	% echo $#x $#y
	1 0

	% set x = ("")
	% set y = ("`echo`")
	% echo $#x $#y
	1 0

	% set x = ()
	% set y = (`echo`)
	% echo $#x $#y
	0 0

	% if (() == "`echo`") echo huh
	% if (() == ("`echo`")) echo huh
	huh
	% if ("" == ("`echo`")) echo huh
	% if ("" == "`echo`") echo "huh?"
	huh?
	
Is this what was intended?

Dan LaLiberte
liberte at uiucdcs.Uiuc.ARPA
ihnp4!uiucdcs!liberte



More information about the Comp.bugs.4bsd.ucb-fixes mailing list