THX! The key to me is :"Echo has a peculiar behavior that when it encounters a single "\" who doesn't have anybody else to escape, it will print out "\" anyway. " I know the rest. And I did not ask this question for fun.

pasu (InTheSky)
Cuz I wrote below statement in my script:

sed s/\\\\//\\\\\\\\\\\\//g tmpfile

And I was really puzzled when I tune this script. I had to try many times to get the correct form.

hehe...What's more, do you know what did I want to do with the statement above?

2001-4-26 -04:00

回到话题: Sailor和Egg,看你们“啊”得这么起劲,来回答我的问题:为什么echo \\和echo \\\\的结果都是\,echo \\\\\\和echo \\\\\\\\的结果都是\\,而echo \\\\\\\\\\和echo \\\\\\\\\\\\的结果都是\\\呢?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论