This question already has an answer here:
- How can I replace a string in a file(s)? 7 answers
Here is an example of what I am trying to do:
#!/bin/bash Update=$1 if [$Update == Value] then NewValue= $Update vi %s/Value/$NewValue/g > Updatedfile fi exit 0
Is there a way to utilize
vi commands within a script? My thoughts are that some type of piping would do this?