Kernel Hacks & Weird Filenames

Lewis R. Jansen lrj at batcomputer.tn.cornell.edu
Wed Apr 27 00:20:22 AEST 1988


In article <4965 at chinet.UUCP> les at chinet.UUCP (Leslie Mikesell) writes:
}In article <11204 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
}}}In article <11153 at mimsy.UUCP> (Chris Torek) wrote:
}}}}First, `non-printable characters'.  Well, there are certainly numerous
}}
}}But it does not.  (`ls' prints `?' for control characters; `ls|cat -v'
}}expands them; other programs have other means of displaying them.)
}
}What? How can ls|cat -v display control characters if ls changes them?

	  The ls command checks to see if its output is going to
	a terminal or to some other place.  If it's writing to a
	terminal, ls changes the various unprintable characters
	to be ``?'', otherwise it leaves them alone.

	  This is on SunOS 3.4, and probably evolved from 4BSD.

-- 
				-- Lewis R. Jansen, LASSP Systems Grunt
					lrj at helios.tn.cornell.edu
					  ...!cornell!lassp!lrj
	    "You can't fight in here, this is the War Room!"



More information about the Comp.unix.wizards mailing list