![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-11-11 08:23 |
47,815 topics / 349,930 posts / today 0 new / 48,291 members |
| DOS批处理 & 脚本技术(批处理室) » [Closed]Why is the 1 lost when executing echo %%i %%j 1 >> ok.txt? |
| Printable Version 6,309 / 22 |
| Floor16 namejm | Posted 2006-09-21 11:06 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Can double quotes also be used for escaping? How is the writing?
|
|
| Floor17 pengfei | Posted 2006-09-21 11:12 |
| 银牌会员 Posts 485 Credits 1,218 From 湖南.娄底 | |
|
Using double quotes is not for escaping. It's just to enclose 0-9 with quotes to prevent the system from treating them as handles.
|
|
| Floor18 namejm | Posted 2006-09-21 11:30 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
The method of enclosing 0-9 in quotes doesn't work, because the way of writing echo 123 "1">test.txt writes the string 123 "1" into test.txt, not the desired 123 1.
|
|
| Floor19 vkill | Posted 2006-09-22 07:45 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Still writing like this is easy to understand >>ok.txt echo %%i %%j 1
|
|
| Floor20 lxmxn | Posted 2006-09-22 23:22 |
| 版主 Posts 4,938 Credits 11,386 | |
|
There is such a big knowledge in a simple ECHO?
Got to learn something new again~~~ :) |
|
| Floor21 nanhui112 | Posted 2008-01-02 17:27 |
| 初级用户 Posts 59 Credits 127 | |
|
>>text.txt echo 451563575 1
Still this kind is good, didn't expect there is such a way of writing. I endorse `^_^` |
|
| Floor22 haiou327 | Posted 2008-01-02 21:31 |
| 高级用户 Posts 348 Credits 713 | |
|
echo %%i %%j ^1 >>ok.txt
|
|
| Floor23 luowei14 | Posted 2008-10-15 21:37 |
| 初级用户 Posts 98 Credits 193 | |
|
I really didn't notice this situation, I need to read more materials in the future..
|
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |