This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / sed语句中,怎么表示回车换行?比如我想把一个字符aaa替换成回车换行,谢谢
-oceandeep(北极熊·猪真的很快乐);
2003-9-10
(#1364496@0)
-
Didn't you see my reply at #1363938?sed -e 's/aaa/\
/g' file1 > file2
-ican(apple);
2003-9-10
{37}
(#1364547@0)
-
Sorry, I miss one blackslash. it should besed -e 's/aaa/\
/g' file1 > file2
-ican(apple);
2003-9-10
{37}
(#1364552@0)
-
No way!!!!!!!!!!!!! It can't show the backslash at Rolia. Please type the blackslash after the second slash and then type ENTER key.
-ican(apple);
2003-9-10
(#1364558@0)
-
你意思是放个backslash解释符,我好像试过了,我重新去试试
-oceandeep(北极熊·猪真的很快乐);
2003-9-10
(#1364573@0)
-
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-ican(apple);
2003-9-10
(#1364577@0)
-
谢谢,果然出来了,能用:)我想起来了,我刚才试的时候是在回车前加了个ctrl+v:)谢谢
-oceandeep(北极熊·猪真的很快乐);
2003-9-10
(#1364584@0)
-
That's the stupid Carriage Return sign from DOS text file. If you want to trasfer the DOS text file to UNIX format, you have to type ctrl+v and M to match the ^M.
-ican(apple);
2003-9-10
(#1364595@0)
-
对不起,我看了,但不懂,这条命令怎么分2行啊?一打回车,就执行了:(
-oceandeep(北极熊·猪真的很快乐);
2003-9-10
(#1364565@0)
-
The trick is the blackslash. Without it, the shell will consider the ENTER as the RUNNING order.
-ican(apple);
2003-9-10
(#1364586@0)