Saved Bookmarks
| 1. |
Solve : batch file with ASCII art? |
|
Answer» Hi guys, echo _ You are using the 'pipe' so the Command Interpreter expects a valid command after it but finds __ instead. This is invalid so the script fails the first TIME the 'pipe' is used. To correct this Escape the pipes. & Welcome to the CH forums..Quote You are using the 'pipe' so the Command Interpreter expects a valid command after it but finds __ instead. This is invalid so the script fails the first time the 'pipe' is used. Aah, and I've already been AFRAID of that stuff. Quote To correct this Escape the pipes. I had to prefix them with carets?! I did that for all pipes but failed again. What are all relevant special characters and symbols in this regard? Quote & Welcome to the CH forums.. Thanks. :-) Thank you.I Escaped the pipes using the caret and the script ran without problem. echo ^|__ echo ^|/_/ echo ^| echo ^| ... I failed. But after prefixing also '<', '>' and '_' it ran! :-) Maybe there is a whole bunch of special characters needing a such special treating?! Thanks so far! There's a list here.. Quote from: Dusty on October 23, 2009, 01:18:34 AM There's a list here.. Thank you! Quoting from there: When piping or redirecting any of these charcters you should prefix with the escape character: \ & | > < ^ e.g. ^\ ^& ^| ^> ^< ^^ end of quoting As you can see this shouldn't be a _complete_ list because I had to prefix ' _ ' in my batch, too?! No. the underscore has no special meaning to the command interpreter and therefore does not require escapement.Quote from: BC_Programmer on October 23, 2009, 10:31:29 AM No. the underscore has no special meaning to the command interpreter and therefore does not require escapement. Well, that may be or not. In fact I had to prefix even all underline characters (not 'underscore') in order to get my batch running. But maybe there is a 'hidden truth'? That's why here again what I did for another example: echo ^_^_ ^_^_ echo .' `...' `. echo ^_^_^| ^| ^|^_^_ echo .' \ . / `. echo ^| ./###\. ^| echo ^>---- ^|#####^| ----^< echo ^| `\###/' ^| echo `.^_^_ / . \ ^_^_.' echo /^| ^| ^| echo / `.^_^_^_.^.^_^_^_.' echo ^| echo ^| echo \ echo \ )\ echo `. /' ^| echo \ /' ) echo \ /' /' echo \ /' /' echo \( /' echo ) /' echo ^| /' echo ^|( echo ^|^| Thank you. Belka - your script works perfectly without the underline (underscore) characters being escaped. Try this, works for me, tested on Win2k, Win2k.Pro, Win XP.HE and Win XP Pro. Code: [Select]@echo off cls echo __ __ echo .' `...' `. echo __^| ^| ^|__ echo .' \ . / `. echo ^| ./###\. ^| echo ^>---- ^|#####^| ----^< echo ^| `\###/' ^| echo `.__ / . \ __.' echo /^| ^| ^| echo / `.___..___.' echo ^| echo ^| echo \ echo \ )\ echo `. /' ^| echo \ /' ) echo \ /' /' echo \ /' /' echo \( /' echo ) /' echo ^| /' echo ^|( echo ^|^| Although when you do escape them, it has a bunch of anime smiley's... Quote from: Dusty on October 23, 2009, 03:07:55 PM Belka - your script works perfectly without the underline (underscore) characters being escaped. I admit you're right. I checked it renewed. Ago I got a failing, no idea what happened. Okay, in this way we both learned something new. Thank you for reliable supporting. |
|