ctrl (was: end of line character)

Guy Harris guy at auspex.auspex.com
Sat Jul 15 04:59:28 AEST 1989


 >|\>	cr="`ctrl M`"
 >|\You forgot to supply the "ctrl" command - it's not a standard part of S5
 >|[includes man page for ctrl that Maarten's written in comp.sources.unix]
 >
 >Um, why not S5 "tputs"?

Because:

	1) there's no capability that's *defined* to be a carriage return
	   character (it'd be pointless - why not just use \r?), so
	   you'd have to set TERM in the particular "tputs" command and
	   request some capability that is a \r, which seems like a lot
	   of trouble to just get \r - if you insist on doing it with a
	   command,

		cr=`echo '\r\c'`

	   should do it quite well under S5 (it works under SunOS 4.0,
	   with an S5R3.1-based Bourne shell, if you set PATH to "pick
	   up" the S5 "echo");

	2) the mechanism that worked under BSD in his example should
	   work under S5 as well.



More information about the Comp.unix.questions mailing list