Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!ukc!its63b!xsimon From: xsimon@its63b.UUCP Newsgroups: comp.unix.wizards Subject: Re: SysV shell questions Message-ID: <612@its63b.ed.ac.uk> Date: Mon, 31-Aug-87 15:33:57 EDT Article-I.D.: its63b.612 Posted: Mon Aug 31 15:33:57 1987 Date-Received: Thu, 3-Sep-87 06:19:07 EDT References: <10279@orchid.waterloo.edu> <5980007@hpfcdc.HP.COM> <6330@brl-smoke.ARPA> <2888@ulysses.homer.nj.att.com> Reply-To: xsimon@its63b.ed.ac.uk (Simon Brown) Organization: Computer Science Department, Edinburgh University Lines: 36 In article <2888@ulysses.homer.nj.att.com> dgk@ulysses.homer.nj.att.com (David Korn[eww]) writes: > >ksh has the print built-in command which subsumes both BSD and Sys V echo. >print -r does not perform escape sequence expansions >print -n does not echo a newline >print -u2 will echo into file descriptor 2. > >David Korn >{ihnp4,allegra}ulysses!dgk I don't see why a "print -u2" is necessary. Is this a particular example of a more-general "print-on-a-named-descriptor" feature (so that "print -u4", etc.. will do The Obvious Thing), or is it a once-off? In either case, there seems little point in introducing extra syntax for doing what can be easily done with existing syntax - namely "print ... 1>&2". Or is it that you cannot redirect i/o on a builtin in ksh? (I know, I should try this out to see, but that involves fetching sources off tape and compiling them which will take years and years...) Another thing - it looks like this "print" built-in cannot be used to echo anything that already begins with a "-" (because this would get interpreted as an option-flag). Or is there another option-flag to say "No more flags, just echo the rest!". %{ Simon. %} -- ---------------------------------- | Simon Brown | UUCP: seismo!mcvax!ukc!its63b!simon | Department of Computer Science | JANET: simon@uk.ac.ed.its63b | University of Edinburgh, | ARPA: simon%its63b.ed.ac.uk@cs.ucl.ac.uk | Scotland, UK. | ---------------------------------- "Life's like that, you know"