开发者

change string in txt file

Is it possible using a batch script to change string in a txt file?

For example, I have status.txt, which contai开发者_开发百科ns 2 lines:

SingleSite integer1
MultiSite  integer2

I want to change them into:

TAG  integer1
Engineer integer2 

so SingleSite becomes TAG and MultiSite becomes Engineer


sed -e "s/SingleSite/TAG/g" status.txt > new.status.txt using one of the ports of sed mentioned in the article in Helen's comment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜