Skip to content

irvingrivas/FileStringReplacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

FileStringReplacer

This executable replaces every string in a UTF-8 encoded text file with another. This is not SED and is a far inferior version of it, but was fun to do in C.

Here are some specifications

  • File Size Limit of One MB
  • Requires UTF-8 encoded file
  • Works on hard and soft links
  • Performs buffered manipulation as opposed to streamed (sed)

To build this, do the following on a Linux/MacOS terminal or Windows Command Prompt (hopefully with bash installed):

git clone "https://github.com/irvingrivas/FileStringReplacer"
cd FileStringReplacer
cmake .
make

To run the executable, do the following as an example

./stringreplace tmp.txt lorem quorum

This executable is a toy-version of sed and the below should do the same thing as the above for inputs within specs:

sed -i 's/lorem/quorum' tmp.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published