home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17129 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.8 KB

  1. Path: sparky!uunet!know!cass.ma02.bull.com!mips2!news.bbn.com!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!news.funet.fi!hydra!klaava!wirzeniu
  2. From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: FIX: echo ??? (was : FIX: UUCP, !, bash and smail)
  5. Message-ID: <1992Nov19.000725.13696@klaava.Helsinki.FI>
  6. Date: 19 Nov 92 00:07:25 GMT
  7. References: <4926TB2w165w@dogear.spk.wa.us> <1e11p6INNl71@usenet.INS.CWRU.Edu> <1992Nov17.204146.4652@ksmith.uucp>
  8. Organization: University of Helsinki
  9. Lines: 28
  10.  
  11. keith@ksmith.uucp (Keith Smith) writes:
  12. >Perhaps I am an idiot, but I've written a TON of shell scripts that use
  13. >embedded escapes: "Ring the bell \007\007"
  14. >
  15. >and hanging end of lines: "Press Your Selection >\c"
  16. >
  17. >and while I've discovered -n ( echo -n "Press Your Selection >" ) this
  18. >seems a bit ridiculous to have to change all this to port over to linux.
  19. >SVR4, SCO stuff, & Coherent don't seem to have any problem with embedded
  20. >escapes.  Is this a problem with bash?  '\\' doesn't help either.
  21. >
  22. >So what did I miss?  Should I add a flag to sh/bash somewhere?  Can it
  23. >be done in the top of the script?
  24.  
  25. It is a fact of life that many Unix versions have different echos.  I
  26. believe that the most SysVish systems have similar echos, and dittor
  27. for BSDish systems.  This is just one of the things that you have to
  28. be careful about.
  29.  
  30. In fact, I would personally like a very, very basic echo that did
  31. nothing but echoed its arguments and a newline.  No fancy newline
  32. suppression or escape codes, that belongs in printf.  Yup, printf is
  33. available as a command as well, not just as a function in C.  Check
  34. out shellutils from GNU.
  35.  
  36. --
  37. Lars.Wirzenius@helsinki.fi  (finger wirzeniu@klaava.helsinki.fi)
  38.    MS-DOS, you can't live with it, you can live without it.
  39.