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

  1. Path: sparky!uunet!ogicse!uwm.edu!linac!uchinews!a-douglas@uchicago.edu
  2. From: a-douglas@uchicago.edu (Allen Douglas)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: echo question
  5. Message-ID: <1992Nov9.225645.15680@midway.uchicago.edu>
  6. Date: 9 Nov 92 22:56:45 GMT
  7. Article-I.D.: midway.1992Nov9.225645.15680
  8. References: <1992Nov9.171618.5675@midway.uchicago.edu>
  9. Sender: news@uchinews.uchicago.edu (News System)
  10. Organization: U of C  Law School
  11. Lines: 28
  12.  
  13. In article <1992Nov9.171618.5675@midway.uchicago.edu>,I write:
  14. > I would like to echo tab and line return characters to the screen and/or 
  15. > understandto a file. But I must not the escaping/quoting mechanism.  According
  16. > to my UNIX reference I should be able to type:
  17. > quads% echo Bob'\t\t'cat
  18. > and get:
  19. > Bob        cat
  20. > unfortunately I get:
  21. > quads% echo Bob'\t\t'cat
  22. > Bob\t\tcat
  23.  
  24. Thanks for the e-mail.  The shell I am using is sh, but the problem seems
  25. to be the fact that I am using Berkley unix instead of system V. Thanks to
  26. Bruce Barnett for this workaround:
  27.  
  28.  
  29. you are using the Berkley version of echo, which does not understand
  30. '\t'
  31.  
  32. tr does.
  33.  
  34. echo 'X' | tr 'X" '\t'
  35.  
  36. also - put the tab in the shell script file...
  37. echo 'X                            X'
  38.