Version 0.2.1
Copy text-replacer-with-file to a directory that is in your PATH.
text-replacer-with-file TARGET_FILE REPLACED_TEXT INSERTED_FILECreate a.txt, b.txt and c.txt as;
This is a text file for tests. abc will be replaced.
Duplicated bcd will be replaced.
This bcd will be also replaced.
c/d/e dosen't exist."This text was in b.txt""Multi lines in c.txt
are inserted!"text-replacer-with-file a.txt abc b.txta.txt will be;
This is a text file for tests. "This text was in b.txt" will be replaced.
Duplicated bcd will be replaced.
This bcd will be also replaced.
c/d/e dosen't exist.text-replacer-with-file a.txt abc c.txta.txt will be;
This is a text file for tests. "Multi lines in c.txt
are inserted!" will be replaced.
Duplicated bcd will be replaced.
This bcd will be also replaced.
c/d/e dosen't exist.text-replacer-with-file a.txt bcd b.txta.txt will be;
This is a text file for tests. abc will be replaced.
Duplicated "This text was in b.txt" will be replaced.
This "This text was in b.txt" will be also replaced.
c/d/e dosen't exist.text-replacer-with-file a.txt cde b.txta.txt will not change because cde doesn't exist in a.txt.
Should this behavior return not 0? Behave as an error?
./test/run.sh
shUnit2 is a xUnit for ShellScript.
Download it from here (I've downloaded shunit2-2.1.6.tgz) and extract it. Then, copy src/shunit2 into test directory.
An official documentation is here. Refer it to know how to use shUnit2 more.