goinsert is tool for insert text to file
known another solution as used sed
command, but
can't get i expected result in mac
you can use to echo
command if you want insert to last line
hoge.txt
text
command
goinsert -file=hoge.txt -text=aaa
hoge.txt
aaa
text
find . -iname *.hoge | xargs goinsert -text=aaa