Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?