V
Vijay Jain
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
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