How to test whether to read .kshrc (was Re: why no .kshrc file?)

Gary S. Trujillo gst at wjh12.harvard.edu
Tue Oct 24 07:05:15 AEST 1989


Some time ago, I inserted the following into my .profile for use with ksh.
I can't claim to understand the exact theory of operation, but it has the
effect of constructing an ENV variable that evaluates to a null value iff
the current shell is non-interactive, so that you don't waste time and CPU
cycles processing aliases, and the like.

	START=~gst/.kshrc
	ENV='${START[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'

(I use "~gst" rather than just "~" so that it works when I su to root.)

Now, in return for this gem of wisdom (obviously not original - I got it
from a posting to unix-pc.general over a year ago), I hope someone will
be able to answer my question about the "dd" command which I am about
to post.  Thanks!

-- 
	Gary Trujillo
	(gst at wjh12.harvard.edu)



More information about the Comp.unix.questions mailing list