+ -
当前位置:首页 → 问答吧 → sed 's/\\//' file为什么不能去掉\

sed 's/\\//' file为什么不能去掉\

时间:2011-03-10

来源:互联网

不得其解。。

作者: amarant   发布时间: 2011-03-10

是不是sed版本问题,我这里可以,

echo  "\\x\\x\\" |sed 's/\\//'
x\x\

$ sed --v
GNU sed version 4.1.5

作者: yinyuemi   发布时间: 2011-03-10

额~~我是ubuntu自带的,而且's/\|//'也不行
  1. GNU sed version 4.2.1
  2. Copyright (C) 2009 Free Software Foundation, Inc.
  3. This is free software; see the source for copying conditions.  There is NO
  4. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
  5. to the extent permitted by law.

  6. GNU sed home page: <http://www.gnu.org/software/sed/>.
  7. General help using GNU software: <http://www.gnu.org/gethelp/>.
  8. E-mail bug reports to: <[email protected]>.
  9. Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
复制代码

作者: amarant   发布时间: 2011-03-10

回复 amarant


    root@:~#  echo "123\346456"|sed 's#\\##'
123346456
root@:~# cat /etc/issue
Ubuntu 9.04 \n \l

作者: wtuter   发布时间: 2011-03-10

看不懂,,, :wink::wink:

作者: hooper007   发布时间: 2011-03-10