Bourne Shell Question?

Michael J. Chinni, SMCAR-CCS-E mchinni at ardec.arpa
Fri Feb 3 01:40:25 AEST 1989


Dan,

	Here is another idea. It is known to work in the BSD 4.3 environment.
It MUST be put in your .profile.  Once it has been setup (in .profile and
.profile executed as if at login time), use "c" instead of "cd".

c()
{
 case $# in
    1) cd $1;;
    *) cd $HOME;;
 esac
 PS1=`pwd`"> ";
}
c

Example if `pwd` is /usr/sys, prompt will be "/usr/sys> ".

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
			    Michael J. Chinni
	US Army Armament Research, Development, and Engineering Center
 User to skeleton sitting at cobweb    ()   Picatinny Arsenal, New Jersey  
   and dust covered terminal and desk  ()   ARPA: mchinni at ardec.arpa
    "System been down long?"           ()   UUCP: ...!uunet!ardec.arpa!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



More information about the Comp.unix.questions mailing list