Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!bcm.tmc.edu!pendragon!news.msfc.nasa.gov!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!cs.tu-berlin.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!orion.sax.de!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: FreeBSD cmd line editor / text editor recommends? Date: 27 Jun 1996 20:11:52 GMT Organization: Private BSD site, Dresden Lines: 33 Message-ID: <4qupu8$9p@uriah.heep.sax.de> References: <4psnen$p9h@hermes.athenet.net> <87g27wffhr.fsf@plm.xs4all.nl> <4qak2g$ef@anorak.coverform.lan> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E brian@awfulhak.demon.co.uk (Brian Somers) wrote: > I assert that you are wrong. > > answer= > echo ksh | read answer > test -n "$answer" && { echo $answer; exit; } > answer=notbash > answer=\${answer#not} > answer=`(eval echo $answer) 2>/dev/null` > test -z "$answer" && echo sh || echo bash > > This script only tests for ksh, sh and bash. If zsh is both bourne > and ksh compatible, what does this script say when run ? Shell Answer bsh sh (True Bourne Shell, SVR4) ash sh (Almquist Shell, /bin/sh in 4.4BSD) ksh ksh (True Korn Shell, SVR4) pdksh bash (public domain Korn Shell) bash bash zsh ksh :-) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)