0

I make a small game with Windows batch. It's just for fun a small holiday project.

How can I add | to an echo command?

At the top of the game/terminal, you can see a big title:

          _____                    _____                    _____                    _____          
         /\    \                  /\    \                  /\    \                  /\    \         
        /::\    \                /::\    \                /::\____\                /::\    \        
       /::::\    \              /::::\    \              /::::|   |               /::::\    \       
      /::::::\    \            /::::::\    \            /:::::|   |              /::::::\    \      
     /:::/\:::\    \          /:::/\:::\    \          /::::::|   |             /:::/\:::\    \     
    /:::/  \:::\    \        /:::/__\:::\    \        /:::/|::|   |            /:::/__\:::\    \    
   /:::/    \:::\    \      /::::\   \:::\    \      /:::/ |::|   |           /::::\   \:::\    \   
  /:::/    / \:::\    \    /::::::\   \:::\    \    /:::/  |::|___|______    /::::::\   \:::\    \  
 /:::/    /   \:::\ ___\  /:::/\:::\   \:::\    \  /:::/   |::::::::\    \  /:::/\:::\   \:::\    \ 
/:::/____/  ___\:::|    |/:::/  \:::\   \:::\____\/:::/    |:::::::::\____\/:::/__\:::\   \:::\____\
\:::\    \ /\  /:::|____|\::/    \:::\  /:::/    /\::/    / ~~~~~/:::/    /\:::\   \:::\   \::/    /
 \:::\    /::\ \::/    /  \/____/ \:::\/:::/    /  \/____/      /:::/    /  \:::\   \:::\   \/____/ 
  \:::\   \:::\ \/____/            \::::::/    /               /:::/    /    \:::\   \:::\    \     
   \:::\   \:::\____\               \::::/    /               /:::/    /      \:::\   \:::\____\    
    \:::\  /:::/    /               /:::/    /               /:::/    /        \:::\   \::/    /    
     \:::\/:::/    /               /:::/    /               /:::/    /          \:::\   \/____/     
      \::::::/    /               /:::/    /               /:::/    /            \:::\    \         
       \::::/    /               /:::/    /               /:::/    /              \:::\____\        
        \::/____/                \::/    /                \::/    /                \::/    /        
                                  \/____/                  \/____/                  \/____/  

  

But the Windows command processor exits processing the batch file instantly when I type in the batch file:

echo |

I tried to use command ECHO with using the syntax "Title" and 'Title', but then it looks ugly.

So, is there any other way to use echo with |?

Compo
  • 34,184
  • 4
  • 22
  • 36
GregGott
  • 33
  • 6
  • 2
    You should be able to use `^` to escape slash and pipe characters. See proposed duplicate. – Peter Duniho May 22 '21 at 18:52
  • I'm so sorry. I have not found anything on this. Thank you so much! – GregGott May 22 '21 at 18:55
  • There's a simpler way, get rid of all twenty one lines of up to one hundred columns of wasted space in order to make `Echo GAME` harder to read, _(or better just use `Title GAME`)_. – Compo May 22 '21 at 20:28
  • [See here](https://stackoverflow.com/a/19188162/12343998) for an answer that demonstrates the easy use of multiple ascii fonts, that avoids filling your script with hardcoded single use banners. – T3RR0R May 23 '21 at 07:41
  • Yes. This is defiantly the better method! Thanks. – GregGott May 23 '21 at 10:45
  • 1
    The simplest idea is to create a file with ASCII art and call it with the `type` command. – GregGott May 23 '21 at 12:51
  • Put ASCII art to batch file from second line. On the first line put command **@more +2 %0 &Exit/B** – Daemon-5 May 23 '21 at 13:32

0 Answers0