1. line continuations:
~~~
@echo off
dir ^
/ad ^
c:\temp
~~~~
results in
dir /ad c:\temp
, which lists only the directories in C:\temp. (Thanks to SteveGTR for that example.)2. Escaping reserved shell characters & | ( < > ^. Use a preceding caret to escape and print the character:
echo this pipe will print ^| but this one won't |
echo and this will print one caret ^^
Thank you. This was very helpful. :)
ReplyDelete