home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 14866 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.2 KB

  1. Xref: sparky comp.unix.questions:14866 comp.unix.shell:5127
  2. Path: sparky!uunet!nntp1.radiomail.net!fernwood!autodesk!dansmith
  3. From: dansmith@Autodesk.COM (Daniel Smith)
  4. Newsgroups: comp.unix.questions,comp.unix.shell
  5. Subject: Re: Redirection of the Echo command to other tty's
  6. Keywords: unix echo shell
  7. Message-ID: <18198@autodesk.COM>
  8. Date: 21 Dec 92 19:21:24 GMT
  9. References: <1992Dec14.222553.22768@sactoh0.sac.ca.us>
  10. Followup-To: comp.unix.questions
  11. Organization: Autodesk Inc., Sausalito CA, USA
  12. Lines: 25
  13.  
  14. In <1992Dec14.222553.22768@sactoh0.sac.ca.us> dwj@sactoh0.sac.ca.us (Daniel W. James) writes:
  15. > However, if I type:
  16. > $ echotest.sh > /dev/console
  17. > I get the following output on the console:
  18. > Line One
  19. >         Line Two
  20. > I.E., during redirection, the \n changes from cr/lf to just lf
  21.  
  22.  
  23.     Try outputting both of the chars.
  24.  
  25.  echo 'line one+=line two' | tr '+=' '\015\012' > /dev/console
  26.  
  27.     This works even when my console has vi running...
  28.  
  29.         Should be very portable!
  30.  
  31.                                 Daniel
  32.  
  33.  
  34. -- 
  35.      Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
  36.           Disclaimer: written by a highly caffeinated mammal
  37.         dansmith@autodesk.com            dansmith@well.sf.ca.us
  38.  
  39.