Sunday, May 5, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1482  / 2 Years ago, thu, june 9, 2022, 11:27:15

is there a tool that can help me to batch edit text files in a certain folder?



I need to delete or insert snippets repeatedly in lots of html files and restructure them.



Thanks in advance!


More From » software-recommendation

 Answers
0

As Julian showed, sed is the right tool for that.



I just want to add two remarks:



you can process multiple files at once, just by providing list of files:



sed -i.bak 's/old text/new text/' dir1/*.html dir2/*.html


Also, if you need to work with some Snippets manually, you can enable Snippets plugin in gedit:



Edit -> Preferences -> Plugins -> Snippets. You might find it handy.


[#43633] Saturday, June 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ledeball

Total Points: 434
Total Questions: 121
Total Answers: 120

Location: Antigua and Barbuda
Member since Sat, Apr 24, 2021
3 Years ago
;