7

Bash shell: Replace a text block by another

view full story
linux-howto

http://www.unix.com – Hello, I'm an starter in Bash scripting. I would like to write a script in Bash shell that replaces a specific text block (a function) by another text block in a file: for example in my file --> $HOME/myFile.js replacing following function between other functions in the file: Code: function ABC() {   blablabla;   blablabla; } by: Code: function ABC() {  another blablabla;  another blablabla;  another blablabla; } without doing any change on other text blocks (functions) in the file. Thanks in advance. (HowTos)