Skip to content

Instantly share code, notes, and snippets.



Last active May 10, 2020
What would you like to do?
Learning to Program The Cloud
insert_file_over_pattern () {
dline=$(sed -n "/${2}/=" $1)
rline=$(expr $dline - 1)
sed --in-place -e "${dline}d" $1
sed --in-place "${rline}r ../inserts/${1}" $1
insert_file_over_pattern 'config/application.rb' 'Bundler.require'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.