adjusting string var to fixed length

Dan_Jacobson at ATT.COM Dan_Jacobson at ATT.COM
Wed Jun 12 04:33:28 AEST 1991


>>>>> "Mark" == Mark Lanzo <lanzo at atesysv.UUCP> writes:

Mark> If you are using "ksh" [...]

Mark> 	myname=Mark
Mark> 	typeset -L10 myname
Mark> 	echo "XX${myname}XX"	

Mark> should produce
Mark>         XXMark      XX

In my prompt I wanted to put $? (last command exit status) in a fixed
width... (PS1='$? '...) but I can't typeset -L3 ? or \?...



More information about the Comp.unix.shell mailing list