<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Is there a particular reason you are trying to create and edit a
file without using and editor?<br>
<br>
If you have a typo, or if there is something in the that your new
entry might conflict with you may not know.<br>
<br>
Doing this as a super user (root / sudo) seems to me to be asking
for trouble.<br>
<br>
Of course it depends on what you are trying to do.<br>
<br>
If you are modifying configuration files in particular I see
possibility of unrecoverable excitement.<br>
<br>
<br>
The apache configuration file has a lot of the settings already in
there and often you just need to uncomment them to activate the
option. Of course you would be working on it only after making a
backup copy of the file.<br>
<br>
When you have finished creating a file from the command line you
would use Control D to end the edit mode.<br>
<br>
Typing eof will just put the characters eof into the file.<br>
<br>
HM<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/09/2015 08:51 PM, Michael Havens
wrote:<br>
</div>
<blockquote
cite="mid:CAFRvun+7ebtGoCie-0=5-EVDEkQpno433A=keAGAWNxaydxi4w@mail.gmail.com"
type="cite">
<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 class="gmail_signature">:-)~MIKE~(-:</div>
</div>
<br>
<div class="gmail_quote">On Mon, Mar 9, 2015 at 8:41 PM, Michael
Havens <span dir="ltr"><<a moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">---------------------------------------------------
PLUG-discuss mailing list - <a class="moz-txt-link-abbreviated" href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a class="moz-txt-link-freetext" href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
</blockquote>
<br>
</body>
</html>