home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!autodesk!dansmith
- From: dansmith@Autodesk.COM (Daniel Smith)
- Newsgroups: comp.unix.shell
- Subject: Re: echo question
- Message-ID: <17898@autodesk.COM>
- Date: 10 Nov 92 23:35:47 GMT
- References: <1992Nov9.171618.5675@midway.uchicago.edu>
- Organization: Autodesk Inc., Sausalito CA, USA
- Lines: 29
-
- In <1992Nov9.171618.5675@midway.uchicago.edu> a-douglas@uchicago.edu (Allen Douglas) writes:
-
- > I would like to echo tab and line return characters to the screen and/or
- > understandto a file. But I must not the escaping/quoting mechanism. According
- > to my UNIX reference I should be able to type:
-
-
- Forget the escape sequences. They're not as portable as
- combining echo with tr:
-
- echo 'first:this=that=other+second:this=that=other+' | tr '=+' '\011\012'
-
- Which gives:
-
- first:this that other
- second:this that other
-
-
- echo varies somewhat from platform to platform (and you didn't say
- which one you were running on). Using "tr" buys you some flexibility, at
- the expense of not being able to print a character or two (like '+' or
- '=' in my example).
-
- Daniel
- --
- Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
- Disclaimer: written by a highly caffeinated mammal
- dansmith@autodesk.com dansmith@well.sf.ca.us
-
-