|
发表于 2003-10-3 11:47:02
|
显示全部楼层
最初由 kiron 发表
请问这句如何解释?
难道abcd这样的字符也可以作分隔符??:ask :ask
当然~~~ ,
[/home/javalee/myperl]cd ~/myshell
[/home/javalee/myshell]pwd
/home/javalee/myshell
[/home/javalee/myshell]a=`pwd`
[/home/javalee/myshell]echo $a
/home/javalee/myshell
[/home/javalee/myshell]echo $a|sed 'sahomealeea' <=分隔符是a
/lee/javalee/myshell
[/home/javalee/myshell]echo $a|sed 'sshomesjavalees' <=分隔符是s
/javalee/javalee/myshell
[/home/javalee/myshell]echo $a|sed 's$home$javalee$' <=分隔符是$
/javalee/javalee/myshell
[/home/javalee/myshell]echo $a|sed 's(home(lee('
/lee/javalee/myshell
只有保证分隔符的对称和唯一,任何字符都可以当分隔符的 |
|