[solved] add more than one line to end of file
right... tether's end. searched thru lq and other forums and that well known search engine for some time, as i cant possibly be the first person ever to need to know how to do this. i can only presume i'm searching the wrong terms, or the terms im searching are just too common to find what im looking for specifically. time to ask.
i'm seeking to add multiple lines to the end of a file
and/or make a file with a number of predefined lines of text already in it
in a bash script.
i'd really rather not have to keep on doing echo addingthislineoftext >> tothisfile && echo addingthislineoftext >> tothisfile && echo addingthislineoftext >> tothisfile && echo addingthislineoftext >> tothisfile && etc. for the hundreds of unique lines i need to add, and would prefer to keep the text in the bash script, as a solid block of text as is to be found in the resulting file it's to be output to (to keep it easy to edit later incase i want to).
so basically, my question is, how can i add, via my bash script, a block of text (contained in the bash script preferably) to the end of a file?
any experienced bashers reading this with a suggestion?
Last edited by Siljrath; 11-23-2010 at 11:11 PM.