[net.unix-wizards] help needed with echo -e, S aed512

jiml@uwmacc.UUCP (Jim Leinweber) (10/10/84)

   Recently we've been bringing up the S statistics and graphics
language under 4.2BSD, without too much trouble, once we reverted to
the old f77 compiler.  S is wonderful.  However, our AED512 graphics
terminal hangs while initializing.  The screen turns blue, as
advertised, the LED'S flash prettily, and the keyboard stops responding
till we push RESET.  It hangs both when AED512 is supplied to tset (as
opposed to, say, `dumb'), and when the aed512 driver is started in S,
presumably because they use similar initialization strings.  Has anyone
else had this problem?

    The trouble doesn't seem to be in the terminal, as it works fine
with S in tek12 emulation mode, and as an AED with our other (non-unix)
computers.  I have not gone through the assembly language code the
initialization sequence pokes into the terminal yet,  but it seems to
be correctly bracketed with the relevant escape sequences.  In the
meantime, I notice that in $C/AEDSIZE  there are 'echo -e ...'
commands. Our versions of echo do not support an -e flag; does anyone
know what it is supposed to do?

			Puzzled in Madison,
			Jim Leinweber

usenet:  ...!{allegra,ihnp4,seismo,...}!uwvax!uwmacc!jiml
arpa:	jiml%uwmacc@wisc-rsch.ARPA
postal:	Jim Leinweber, MACC, 1210 W. Dayton St., Madison Wi 53706, USA
phone:	(608) 256-8884, USA

jpl@allegra.UUCP (John P. Linderman) (10/13/84)

You'd think a command that "echos its arguments" would be simple and
unambiguous, but echo is an object lesson in the ability of reasonable
people to differ about "the obvious".  For example, just about everybody
will probably agree that distinct arguments ought to be separated on
output in some way (every echo I know separates them with a single
blank) and that a newline ought to follow the final argument.  But
every implementation I know of has also recognized that it is useful
to be able to suppress the final newline, so prompts can be echoed.
PWB UNIX systems in the early 70's adopted the convention that if the
last two characters of an argument were \c, then the newline (and any
subsequent arguments) would be suppressed.  Berkeley UNIX adopted a
-n flag to suppress the newline.

I confess to being an early corrupter of echo, modifying it to recognize
all the C escapes like \t and \f and \033.  I complained to the forces
then maintaining USG UNIX, and a version that accepted these escapes was
eventually released.  I think the escapes are great, because they make
my shell scripts much more readable.  Other people differ, and don't
make the escapes available.  Berkeley echo is in this camp.  Version 8
UNIX lets you take your pick.  The -e option causes the C escapes to be
processed, its absence echos the arguments without interpretation.
Since S grew up near, if not under, Version 8, I presume the flag means
interpret escape sequences in the arguments.

The good news is that it is very easy to modify echo to process the
escapes.  The bad news is that there are at least three distinct and
incompatible versions of echo in common use, and writing portable
(and readable) shell scripts is dreadfully difficult as a result.

John P. Linderman  Department of Antiquities  allegra!jpl