test.txt
/
^
用sed替换/为0,^为1
^替换变通的方法是
sed "s/^/★/" test.txt|sed "s/★^/1/"
想过用 sed s/\x22/双引号/ 的方法来替换,可我试了\x00-\x200 没有发现
不过发现了个好用法
sed "s/^/★/;s/\x24/★/" test.txt
我想到的方法,欢迎大家一起讨论sed哈~
[ Last edited by he200377 on 2006-10-31 at 01:34 AM ]
/
^
用sed替换/为0,^为1
^替换变通的方法是
sed "s/^/★/" test.txt|sed "s/★^/1/"
想过用 sed s/\x22/双引号/ 的方法来替换,可我试了\x00-\x200 没有发现
不过发现了个好用法
sed "s/^/★/;s/\x24/★/" test.txt
我想到的方法,欢迎大家一起讨论sed哈~
[ Last edited by he200377 on 2006-10-31 at 01:34 AM ]
