由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - help on sed
相关主题
shell script help?help!!! pipe program
Simple Questionhow to redirect error output under unix
[转载] perl字符串问题How to merge stdout and stderr
help on replacing text in a file (转载)[转载] Re: freopen
Regular expression的问题PERL入门求助
CGI之Perl Script一问System Environment variables in Perl
关于emacs一问。为什么time命令无法重定向?
帮帮忙,用C作一个SHELLcommand line socket tools
相关话题的讨论汇总
话题: sed话题: fn话题: string2话题: string1话题: stdout
进入Unix版参与讨论
1 (共1页)
i***f
发帖数: 10
1
Hi,
Today when I try to replace a string in many files, first
I tried to use "sed -e s/STRING1/STRING2/g *" and only found
out the replaced pattern was output to STDOUT. At last I have
to write a script like this:
#/bin/sh
for fn in *
do {
sed -e s/STRING1/STRING2/g $fn > out.tmp
cp -f out.tmp $fn
}
done
rm -f out.tmp
Anyone can suggest to do the same function by using only one
line?
1 (共1页)
进入Unix版参与讨论
相关主题
command line socket toolsRegular expression的问题
unix下编译fortran 的错误太多,看不到怎么办?CGI之Perl Script一问
Perl问题求助 (转载)关于emacs一问。
how to redirect the output帮帮忙,用C作一个SHELL
shell script help?help!!! pipe program
Simple Questionhow to redirect error output under unix
[转载] perl字符串问题How to merge stdout and stderr
help on replacing text in a file (转载)[转载] Re: freopen
相关话题的讨论汇总
话题: sed话题: fn话题: string2话题: string1话题: stdout