home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / misc / 6192 < prev    next >
Encoding:
Text File  |  1992-11-17  |  3.0 KB  |  91 lines

  1. Newsgroups: comp.os.msdos.misc
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!news.byu.edu!ux1!fcom.cc.utah.edu!tim.src.utah.edu!tim
  3. From: tim@tim.src.utah.edu (Tim Ma)
  4. Subject: Re: Echo command in batch files
  5. Message-ID: <tim.12.722026318@tim.src.utah.edu>
  6. Lines: 79
  7. Sender: news@fcom.cc.utah.edu
  8. Organization: University of Utah
  9. References: <1992Nov14.190918.9554@oracle.us.oracle.com> <1992Nov16.204439.17539@oracle.us.oracle.com>
  10. Date: Tue, 17 Nov 1992 18:51:58 GMT
  11.  
  12. Hi,
  13.  
  14. To "suppress" the CR/LF in the DOS echo command, try:
  15.  
  16. echo hello>temp world >> temp
  17.  
  18. Output should be:
  19. hello world
  20.  
  21. Seems to work with MSDOS 5.0.
  22.  
  23. Tim Ma
  24. Associate Programmer
  25. University of Utah
  26. Email:  tim@src.cppa.utah.edu
  27.  
  28. Original Message below:
  29. -----------------------------------------------------------------------------
  30.  
  31. In article <1992Nov16.204439.17539@oracle.us.oracle.com> skanga@us.oracle.com (Shiraz Kanga) writes:
  32. >From: skanga@us.oracle.com (Shiraz Kanga)
  33. >Subject: Re: Echo command in batch files
  34. >Date: Mon, 16 Nov 1992 20:44:39 GMT
  35. >
  36. >In article <1992Nov14.190918.9554@oracle.us.oracle.com> skanga@us.oracle.com (Shiraz Kanga) writes:
  37. >>Hi folks
  38. >>
  39. >>Does anyone know how to prevent echo from issuing a CR/LF at the end of a line.
  40. >>
  41. >>Eg : If I create the following file called test.bat
  42. >>
  43. >>echo hello > temp
  44. >>echo world >> temp
  45. >>
  46. >>The result in temp is:
  47. >>hello 
  48. >>world
  49. >>
  50. >>I need the result to be:
  51. >>hello world
  52. >>
  53. >>And yes I know echo hello world will work but what I'm trying to do is
  54. >>concatenate two strings which are output by two different programs and
  55. >>get both onto one line.
  56. >>
  57. >>Please respond by mail and I'll summarize to the net if there's interest.
  58. >>
  59. >>thanks
  60. >>
  61. >>shiraz
  62. >>skanga@oracle.com
  63. >>-- 
  64. >>Shiraz Kanga (skanga@oracle.com) Tel: (415)506-5412 Fax: (415)506-7822
  65. >>Analyst -- Desktop Tools Group -- Worldwide Technical Support -- 3OP11
  66. >>Oracle Corporation 500 Oracle Pkwy, MS 659311, Redwood Shores CA 94065
  67. >>"I work for Oracle - I speak and type (over here at least) for myself"
  68. >
  69. >Well folks, as promised heres my summary (since there was little interest)
  70. >
  71. >Some people suggested using external echo commands (xecho, etc) which are
  72. >available for anonymous ftp from various sites. This is not useful for me
  73. >since I am not using echo only.
  74. >
  75. >Another person suggested trying an embedded backspace which might erase the
  76. >CR/LF characters in the file. I did try this before posting and could not get
  77. >it to work.
  78. >
  79. >The most useful suggestion was to concatenate the strings in the dos environment
  80. >and then output the variable to a text file. I will try this (albeit clumsy)
  81. >method as soon as I have the time.
  82. >
  83. >Thanks for the replies
  84. >
  85. >Shiraz
  86. >-- 
  87. >Shiraz Kanga (skanga@oracle.com) Tel: (415)506-5412 Fax: (415)506-7822
  88. >Analyst -- Desktop Tools Group -- Worldwide Technical Support -- 3OP11
  89. >Oracle Corporation 500 Oracle Pkwy, MS 659311, Redwood Shores CA 94065
  90. >"I work for Oracle - I speak and type (over here at least) for myself"
  91.