You are not logged in.
I've been googling for a while but have not found an answer.
The ed tutorial always discuss everything in such detail but I only want to know how to add some text to the end of a file as part of a shell script.
Offline
echo "random text" >> filename
Offline
ed foo.txt
a
words
.
a for append, then end a single . on a line ends append mode
w and q to save and quit of course
not quite sure how to do it with vi, though in ex mode the ed commands work fine
Offline
The tee command allows more control than redirecting:
echo "message" | tee -a
Offline