home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / shell / 4631 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.3 KB

  1. Path: sparky!uunet!autodesk!dansmith
  2. From: dansmith@Autodesk.COM (Daniel Smith)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: echo question
  5. Message-ID: <17898@autodesk.COM>
  6. Date: 10 Nov 92 23:35:47 GMT
  7. References: <1992Nov9.171618.5675@midway.uchicago.edu>
  8. Organization: Autodesk Inc., Sausalito CA, USA
  9. Lines: 29
  10.  
  11. In <1992Nov9.171618.5675@midway.uchicago.edu> a-douglas@uchicago.edu (Allen Douglas) writes:
  12.  
  13. > I would like to echo tab and line return characters to the screen and/or 
  14. > understandto a file. But I must not the escaping/quoting mechanism.  According
  15. > to my UNIX reference I should be able to type:
  16.  
  17.  
  18.     Forget the escape sequences.  They're not as portable as
  19. combining echo with tr:
  20.  
  21.     echo 'first:this=that=other+second:this=that=other+' | tr '=+' '\011\012'
  22.  
  23.     Which gives:
  24.  
  25. first:this      that    other
  26. second:this     that    other
  27.  
  28.  
  29.     echo varies somewhat from platform to platform (and you didn't say
  30. which one you were running on).  Using "tr" buys you some flexibility, at
  31. the expense of not being able to print a character or two (like '+' or
  32. '=' in my example).
  33.  
  34.                 Daniel
  35. -- 
  36.      Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
  37.           Disclaimer: written by a highly caffeinated mammal
  38.         dansmith@autodesk.com            dansmith@well.sf.ca.us
  39.  
  40.