lfs/chapter06/ed-inst.xml
Gerard Beekmans 2ff73c2f31 Added missing && to end of sed
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1160 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2001-09-02 17:50:36 +00:00

23 lines
995 B
XML

<sect2>
<title>Installation of Ed</title>
<para>Ed is an optional package. The only program on a normal LFS system
that uses ed is patch. But these days, ed patch files are quite rare in
favour of the diff format patch files. So, if you personally have no
need to use ed, you can skip it.</para>
<para>Install Ed by running the following commands:</para>
<para><screen><userinput>cp buf.c buf.c.backup &amp;&amp;</userinput>
<userinput>sed 's/int u/int u, sfd/' buf.c.backup | \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;sed '/.*\*mktemp.*/d' | \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;sed 's/.*if (mktemp.*/ sfd = mkstemp(sfn);\</userinput>
<userinput>&nbsp;&nbsp;&nbsp;if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' &gt; buf.c &amp;&amp;</userinput>
<userinput>./configure --prefix=/usr &amp;&amp;</userinput>
<userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput>
<userinput>mv /usr/bin/ed /usr/bin/red /bin</userinput></screen></para>
</sect2>