I'm working on a bash script that will split the contents of a text document depending on the data in the line.
If the contents of the original file were along the lines of
How can I insert into line 3 of this file using bash to result in
text to insert
I'm hoping to do this using a heredoc or something similar in my script
vim -e -s ./file.txt <<- HEREDOC
:3 | startinsert | "text to insert\n"
The above doesn't work of course but any recommendations that I could implement into this bash script?