Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!csustan!polyslo!caus-dp!marcos From: marcos@caus-dp.UUCP (Marcos R. Della) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: PS1 and the bourne shell... Message-ID: <279@caus-dp.UUCP> Date: Tue, 17-Nov-87 11:15:24 EST Article-I.D.: caus-dp.279 Posted: Tue Nov 17 11:15:24 1987 Date-Received: Sat, 21-Nov-87 10:29:52 EST Organization: USPFO for CA - Data Processing Div., SLO, Ca Lines: 39 Keywords: Brain dead system... Xref: mnetor comp.unix.questions:4962 comp.unix.wizards:5507 We just got a few ideas sent to us for the changing of PS1 to show the current directory that you are on (/usr/lib$... etc...) but have in the process managed to discover a few problems with our Xenix system. We are trying to get this to work before we go over to the Sperry 5000/80's at the end of December. We are running Xenix Revision 3.4 from Intel and the Bourne shell won't let us do things like the following... export ps1 cd() { builtin cd $* && case "$1" in "") PS1="$ps1" dir=$HOME ;; /*) PS1="`basename $1`$ps1" dir=$1 ;; ..|*/..) dir=`/bin/pwd`; PS1="`basename $dir`$ps1" ;; */*) PS1="`basename $1`$ps1" dir= ;; *) PS1="$1$ps1" dir= ;; esac && export PS1 } The program bombs at the cd() statment and returns the statment: -sh: syntax error: `(' unexpected Any ideas on whats wrong and what might be done in another method to correct the problem that we seem to be having? We have tested this on the Sperry and it seems to work, but not on the smaller Intel 310 machines. Any help would be appreciated. Marcos Della -- ...!lll-crg -> !csustan -\ | Whatever I said doesn't ...!sdsu ----->->!polyslo!caus-dp!marcos | mean diddly as I forgot ...!ihnp4 -> !csun ----/ | it even before finishing ...!dmsd ---/ | typing it all out!!!