Ksh use (was Re: Should ``csh'' be part of ...)

XMRP50000[jcm]-a.v.reed avr at mtgzz.UUCP
Fri May 20 03:30:08 AEST 1988


In article <11747 at duke.cs.duke.edu>, ndd at duke.cs.duke.edu (Ned Danieley) writes:
< As long as we're talking about ksh, is there any way to do job
< control without typing fg (and bg)? In csh
< 
< %2
< 
< brings the second stopped job into the foreground; as I understand it,
< in ksh I have to do
< 
< fg %2
< 
< A minor nit, but when you have 7 or 8 years invested in one shell,
< the change-over has to be very smooth, or it won't be made.

Just put the following in the ksh $ENV file of every user who wants it:

function argfg	{ fg %$1
		}
for jobnum in 0 1 2 3 4 5 6 7 8 9 # as many as you allow per user
	do alias -x %$jobnum="argfg $jobnum"; done

I do believe that's smooth enough....
					Adam Reed (mtgzz!avr)



More information about the Comp.unix.wizards mailing list