项目作者: Kenplix

项目描述 :
CLI program to replace text in files
高级语言: Python
项目地址: git://github.com/Kenplix/replacer-CLI-utility.git
创建时间: 2020-03-28T19:48:59Z
项目社区:https://github.com/Kenplix/replacer-CLI-utility

开源协议:

下载


Replacer

CLI program to replace text in files.

With its help, you can do something similar to this.
It is useful to use if you need to replace some template text in large files.

How to run?

  1. Clone or download this repository
  2. Run from the terminal as: ./replacer.py

Examples of using

python3 replacer.py -o <old text> -n <new text> --file <file path>
python3 replacer.py -o <starting point> -n <end point> --file <file path> --insertion <insert value>

Аlso you can use

MacOS : sed -i '' 's/old-text/new-text/g' test_data1.txt
Linux : sed -i 's/old-text/new-text/g' test_data1.txt