[求助] sed -e "s@^@ @"啥子意思
时间:2007-11-22
来源:互联网
如题,查了半天没查到:)
作者: bikecheng 发布时间: 2007-11-22
sorry,查到了,原来是@在搜索的时候要用原名啊(at sign),答案如下,希望大家也可以用到:
[addr1[,addr2]]s/expr/string/[flags]
Searches the indicated lines for a string of characters matching the expression defined by expr, and replaces that set of characters with string. This command's operation is modified by the g, p, and w file flags.[Table Note 4] If either expr or string includes a slash (/), you must escape the literal slash with a backslash (s/path/path\/file/) or use alternative delimiters such as the at sign (@) or question mark (?). For example, s@path@path/file@ replaces path with path/file.
[addr1[,addr2]]s/expr/string/[flags]
Searches the indicated lines for a string of characters matching the expression defined by expr, and replaces that set of characters with string. This command's operation is modified by the g, p, and w file flags.[Table Note 4] If either expr or string includes a slash (/), you must escape the literal slash with a backslash (s/path/path\/file/) or use alternative delimiters such as the at sign (@) or question mark (?). For example, s@path@path/file@ replaces path with path/file.
作者: bikecheng 发布时间: 2007-11-22
简而言之就是作分割符,就不用对regex里的“/”转义了...
作者: Jockey 发布时间: 2007-11-22
分隔符不一定必须是 / 的,只要保证三个符号一致就可以。
作者: anbutu 发布时间: 2007-12-20
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28