Page 1 of 1
Echoing '|' Doesnt work
Posted: 31 May 2010 22:33
by phillid
Hello all. I've been trying to set one of my batch files screen output so it is easier to read. I've decided to have tables made out of + - | etc, but I encountered a problem:
This didn't work because the | is meant to be used like:
So I put a ^ like this:
This still doesn't work.
Please Help!
Thanks,
Phillid
Re: Echoing '|' Doesnt work
Posted: 01 Jun 2010 11:24
by aGerman
What exactly does output mean? Your standard output is the the batch window. The pipe (|) is for redirecting the stdOut of one command to a second command.
Regards
aGerman
Re: Echoing '|' Doesnt work
Posted: 01 Jun 2010 18:38
by phillid
I mean It will put something like the following on-screen:
Code: Select all
+--TITLE--+
|Data |
|Data |
+---------+
But I stuffs-up when trying to echo a |
Re: Echoing '|' Doesnt work
Posted: 01 Jun 2010 19:27
by DosItHelp
Code: Select all
@echo off
for %%A in (
"+--TITLE--+"
"|Data |"
"|Data |"
"+---------+"
) do echo.%%~A
DosItHelp?
Re: Echoing '|' Doesnt work
Posted: 02 Jun 2010 13:58
by avery_larry
echo.^| whatever ^|
Re: Echoing '|' Doesnt work
Posted: 02 Jun 2010 14:51
by aGerman
Another possibility could be to use frame characters. Try this
Code: Select all
@echo off &setlocal
chcp 437>nul
echo.
echo ÉÍËÍ»
echo º1º2º
echo ÌÍÎ͹
echo º3º4º
echo ÈÍÊͼ
echo.
echo ÚÄÂÄ¿
echo ³1³2³
echo ÃÄÅÄ´
echo ³3³4³
echo ÀÄÁÄÙ
echo.
pause
Regards
aGerman