"Csaba Gabor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> foxidrive wrote:
>> On Tue, 04 Dec 2007 15:38:36 +0100, Csaba Gabor <(E-Mail Removed)> wrote:
>>> My question is how to pipe newlines directly
>>>from echo into more.
> ...
>>> echo foo^
>>>
>>> bar
>>>
>>>
>>> Very nifty. What I would now like, however,
>>> is for the result of an echo, piped into
>>> more, to display foo on one line, followed
>>> by bar on the next. The following 3 lines
>>> do not work:
>>>
>>> echo foo^
>>>
>>> bar | more
>>
>> Is this useful?
>>
>> @echo off
>> (
>> echo foo
>> echo.
>> echo bar
>> )|more
I often use compound commands like that when I want a batch script to
generate a log file of its proceedings, as I think that this:
(
echo/starting at:
time /t
call

rocess
echo/done at
time /t
) >logfile.log
is more efficient than multiple instances of the ">>" redirection operator,
in addition to being simpler to get right.
/Al
> Fabulous!
> From the command line I can now do:
>
> (echo foo && echo bar) | more
> (echo.foo&&echo.bar)|more
>
> Not only that, but it also gives the same
> output without the piping:
>
> (echo foo && echo bar)
>
> Furthermore, I'd been wanting a way to
> make a totally blank prompt/page under cmd.exe
> and this is an easy way:
>
> (@echo off && cls)
>
>
> Thanks very much for your suggestion Foxi!
> Csaba Gabor from Vienna
>
> PS. The results are meant for use with a
> single invocation of the command line.