- 论坛徽章:
- 0
|
本帖最后由 六安瓜片 于 2014-06-10 07:53 编辑
D:\>sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-gnu-utils@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
D:\>
转换前
--------------------
1 <- windows回车
2 <- windows回车
3 <- windows回车
4 <- windows回车
5 <- windows回车
sed -i "s/1/test/g" test.txt
转换后
--------------------
test <- unit回车
2 <- unit回车
3 <- unit回车
4 <- unit回车
5 <- unit回车
|
|