![Share on Facebook Facebook](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share by email mail](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)
プログラムを作成して一連の処理を自動化することは手間と間違いを無くす上ではとても有効な手段と思います
現場でDos(Windows)バッチファイルを組んで処理を自動化することはよくあることですが、先日ちょっとハマりました
誰が考えても
1 |
echo <html> > index.html |
はエラーになります。今更ながらエスケープ文字はなんだっけ?
適当に
1 |
echo \<html\> > index.html |
とかやってもエラーです(笑)
1 |
echo "<html>" > index.html |
ではindex.htmlには”<html>”が出力され”が余分です
探したところ^(carets/キャレット)でエスケープできることがわかりました(感謝!)
Escape Characters
http://www.robvanderwoude.com/escapechars.php
1 |
echo ^<html^> > index.html |
%,^,\は忘れないようにしよう