I've always hated batch and I still do, even for the most simple things I prefer C or PHP/Perl. But this time I could not go without it, ****sigh****.
I wanted to redirect an echo command to an other command. For example:
echo example | more
but I also wanted to be able to use special characters in the echo part of the pipe:
echo & | more
Which of course did not work. So I tried:
echo ^& | more
Which did not work either. Then by trial-and-error I found:
echo ^^^& | more
and that worked. But as interested programmer I wonder why. Why did ^&
not work and ^^^&
did?