<div dir="ltr">First, if you're just trying to backup conf files, then simply make a backup of the conf file and restore it when needed.<div><br></div><div>To answer your question, yes, specifically with the cat command, this won't work with echo. You can test this on your own and t</div><div><br></div><div><div>$ cat > test << EOF</div><div>> 1</div><div>> 2</div><div>> 3</div><div>> EOF</div><div>$ cat test </div><div>1</div><div>2</div><div>3</div><div>$ cat >> test << EOF</div><div>> 4</div><div>> EOF</div><div>$ cat test </div><div>1</div><div>2</div><div>3</div><div>4</div></div><div><br></div><div>You can also start with an append if you wish:</div><div><br></div><div><div>$ cat >> test << EOF</div><div>> 1</div><div>> 2</div><div>> EOF</div><div>$ cat test </div><div>1</div><div>2</div></div><div><br></div><div><a href="http://www.linuxjournal.com/content/working-stdin-and-stdout">http://www.linuxjournal.com/content/working-stdin-and-stdout</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 11:51 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">do you think this would have the desired effect?<div><br></div><div><div><br></div><div>sudo cat >> /etc/apt/apt.conf << eof</div><div>Acquire::Queue-Mode "host";</div><div>eof</div><div><br></div><div>sudo cat >> /etc/sysctl.conf << eof</div><div># </div><div># Reduce the swap tendency </div><div>vm.swappiness = 10</div><div>eof</div><div><br></div><div>sudo cat >> /etc/apache2/apache2.conf << eof</div><div>Include /etc/phpmyadmin/apache.conf</div><div>eof</div><div><br></div><div>sudo cat >> /etc/fstab << eof</div><div>/media/bmike1/entertainment/Pictures /home/bmike1/Pictures none bind 0 0 </div><div>eof</div></div><div><br></div><div>would the single line appendages just need the blank line?</div></div><div class="gmail_extra"><br clear="all"><div><div>:-)~MIKE~(-:</div></div><div><div class="h5">
<br><div class="gmail_quote">On Mon, Mar 9, 2015 at 8:41 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Okay now, I learned just today how >> works and I want to update all of my reinstall scripts so all I need to do is copy-n-paste into a terminal and everything will be done. Learned when I was doing Linux from scratch that to create a file of multiple lines without starting an editor you do:<div><br><div><pre style="border:1px solid rgb(5,5,5);padding:0.5em 1em;margin:0px 2em 0.5em;color:rgb(16,19,16);line-height:19.2000007629395px;background-color:rgb(229,229,229)"><kbd><b>cat > filename << "EOF"
</b>contents </kbd></pre><pre style="border:1px solid rgb(5,5,5);padding:0.5em 1em;margin:0px 2em 0.5em;color:rgb(16,19,16);line-height:19.2000007629395px;background-color:rgb(229,229,229)"><kbd><b>of</b></kbd></pre><pre style="border:1px solid rgb(5,5,5);padding:0.5em 1em;margin:0px 2em 0.5em;color:rgb(16,19,16);line-height:19.2000007629395px;background-color:rgb(229,229,229)"><kbd><b>file</b></kbd></pre><pre style="border:1px solid rgb(5,5,5);padding:0.5em 1em;margin:0px 2em 0.5em;color:rgb(16,19,16);line-height:19.2000007629395px;background-color:rgb(229,229,229)"><b style="line-height:19.2000007629395px;font-family:arial,sans-serif">EOF</b></pre><div><div><div> Oh.... I think I get it. just turn the '>' into '>>'</div><div>am I correct? </div><div><br></div><div>:-)~MIKE~(-:</div></div>
</div></div></div></div>
</blockquote></div><br></div></div></div>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br></div>