home *** CD-ROM | disk | FTP | other *** search
- 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
- From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
- Newsgroups: comp.os.linux
- Subject: Re: FIX: echo ??? (was : FIX: UUCP, !, bash and smail)
- Message-ID: <1992Nov19.000725.13696@klaava.Helsinki.FI>
- Date: 19 Nov 92 00:07:25 GMT
- References: <4926TB2w165w@dogear.spk.wa.us> <1e11p6INNl71@usenet.INS.CWRU.Edu> <1992Nov17.204146.4652@ksmith.uucp>
- Organization: University of Helsinki
- Lines: 28
-
- keith@ksmith.uucp (Keith Smith) writes:
- >Perhaps I am an idiot, but I've written a TON of shell scripts that use
- >embedded escapes: "Ring the bell \007\007"
- >
- >and hanging end of lines: "Press Your Selection >\c"
- >
- >and while I've discovered -n ( echo -n "Press Your Selection >" ) this
- >seems a bit ridiculous to have to change all this to port over to linux.
- >SVR4, SCO stuff, & Coherent don't seem to have any problem with embedded
- >escapes. Is this a problem with bash? '\\' doesn't help either.
- >
- >So what did I miss? Should I add a flag to sh/bash somewhere? Can it
- >be done in the top of the script?
-
- It is a fact of life that many Unix versions have different echos. I
- believe that the most SysVish systems have similar echos, and dittor
- for BSDish systems. This is just one of the things that you have to
- be careful about.
-
- In fact, I would personally like a very, very basic echo that did
- nothing but echoed its arguments and a newline. No fancy newline
- suppression or escape codes, that belongs in printf. Yup, printf is
- available as a command as well, not just as a function in C. Check
- out shellutils from GNU.
-
- --
- Lars.Wirzenius@helsinki.fi (finger wirzeniu@klaava.helsinki.fi)
- MS-DOS, you can't live with it, you can live without it.
-