PC Review


Reply
Thread Tools Rate Thread

Echo multiple messages separated by new line thorugh "echo" command

 
 
Vijay Jain
Guest
Posts: n/a
 
      12th Dec 2006
Hi All,

I want to echo multiple messages through one echo command. Also I want
to separate the message by new line. This is for scripting requirement
for a tool which expects multiple values separated by new line

following form is what needs to be supported
echo xyz <new line> uvw <newline> abc | mytools

this would work on linux as
echo ' xyz
uvw
abc' | mytool

I want to have similar functionality on windows.

I found on net that seemed to address my issue. Following is the
resolution
---------------------------------------------------------------------------------------------------------------------
In cmd prompt (tested on Win2k and WinXP) line you can simulate a
return carriage or new line with CTRL-T
If you were to drop into cmd, and type :
net send %computername% "LINE ONE<CTRL-T>LINE TWO"
(replacing <CTRL-T> by pressing CTRL and T together)
You'll get a pop-up message with 'LINE ONE' on one line and 'LINE TWO'
on the next.
ALT-2+0 (hold down ALT and press 2 then 0 on the number pad) does the
same thing as CTRL-T
To add this to a batch file use edit.com. It allows you to press
CTRL-T.
---------------------------------------------------------------------------------------------------------------------

However when i tried this myself, this did not work.
e.g
G:\1014\install\web\identity\oblix\tools\setup>echo xyz ^T abcd
xyz ¶ abcd

I tried to use the same through the batch file but this did not work
either,. I tried with edit.com editor as well.

I would appreciate your response in this context.

Thanks,
Vijay

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      12th Dec 2006

"Vijay Jain" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Hi All,

I want to echo multiple messages through one echo command. Also I want
to separate the message by new line. This is for scripting requirement
for a tool which expects multiple values separated by new line

following form is what needs to be supported
echo xyz <new line> uvw <newline> abc | mytools

this would work on linux as
echo ' xyz
uvw
abc' | mytool

I want to have similar functionality on windows.

I found on net that seemed to address my issue. Following is the
resolution
----------------------------------------------------------------------------
-----------------------------------------
In cmd prompt (tested on Win2k and WinXP) line you can simulate a
return carriage or new line with CTRL-T
If you were to drop into cmd, and type :
net send %computername% "LINE ONE<CTRL-T>LINE TWO"
(replacing <CTRL-T> by pressing CTRL and T together)
You'll get a pop-up message with 'LINE ONE' on one line and 'LINE TWO'
on the next.
ALT-2+0 (hold down ALT and press 2 then 0 on the number pad) does the
same thing as CTRL-T
To add this to a batch file use edit.com. It allows you to press
CTRL-T.
----------------------------------------------------------------------------
-----------------------------------------

However when i tried this myself, this did not work.
e.g
G:\1014\install\web\identity\oblix\tools\setup>echo xyz ^T abcd
xyz ¶ abcd

I tried to use the same through the batch file but this did not work
either,. I tried with edit.com editor as well.

I would appreciate your response in this context.

Thanks,
Vijay

=======================
Try this:
echo xyz & echo abcd & echo xzy & echo abc


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to echo the string "command" into a file? Aidan Whitehall Microsoft Windows 2000 CMD Promt 11 12th Jan 2009 11:50 PM
How to change the line display color with the echo batch command? coolthinking Windows XP Performance 0 3rd Jun 2008 10:37 AM
NF325-A7 Sound problem: sounds like an echo ,,echo...echo makes me crazy...crazy...crazy...help...help...help David Sontag DIY PC 17 30th Nov 2007 06:45 AM
Help: SyncToy 1.4 in "Echo" mode doesn't auto-select/Copy "New" fi =?Utf-8?B?SmVyZW15TW9za293aXR6KE1WUCk=?= Windows XP Photos 0 24th Nov 2006 08:21 PM
applicaton.echo / docmd.echo screen still pulsing - Why? Rick A Microsoft Access Form Coding 1 30th Mar 2006 04:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:24 PM.