diff options
author | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-15 12:50:02 +0000 |
---|---|---|
committer | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-15 12:50:02 +0000 |
commit | 8f5efb62001439e55fbacf47e2b4a9f21b6faa01 (patch) | |
tree | 2da80211de9958c3003fbc2721ba240c7b0a41c5 | |
parent | 2bcd77192f30d42f7001d711e33a94a86a3eedf1 (diff) |
Bug 125: simplify seds
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@973 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter06/glibc-exp.xml | 6 | ||||
-rw-r--r-- | chapter06/glibc-inst.xml | 6 | ||||
-rw-r--r-- | chapter06/procinfo-exp.xml | 2 | ||||
-rw-r--r-- | chapter06/procinfo-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/utillinux-inst.xml | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml index 73aa27bad..822d8d83d 100644 --- a/chapter06/glibc-exp.xml +++ b/chapter06/glibc-exp.xml @@ -16,7 +16,7 @@ that it can't read the file, so we simply create an empty file (the empty file will have Glibc default to using /lib and /usr/lib which is fine right now).</para> -<para><userinput>sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ +<para><userinput>sed 's|$(PERL)|/usr/bin/perl|' ../glibc-2.2.3/malloc/Makefile > tmp~:</userinput> This sed command searches through <filename>../glibc-2.2.3/malloc/Makefile</filename> and converts all occurances of <filename>$(PERL)</filename> to @@ -31,7 +31,7 @@ Glibc.</para> when using sed, we can't write straight back to this file so we need to use a temporary file in between.</para> -<para><userinput>sed "s/root/0" ../glibc-2.2.3/login/Makefile > +<para><userinput>sed 's/root/0' ../glibc-2.2.3/login/Makefile > tmp~:</userinput> This sed command replaces all occurances of <filename>root</filename> in <filename>../glibc-2.2.3/login/Makefile</filename> with 0. This is @@ -46,7 +46,7 @@ edited Makefile and then copying it back over the original.</para> <para><userinput>--enable-add-ons:</userinput> This enables the add-on that we install with Glibc: linuxthreads</para> -<para><userinput>sed s/"cross-compiling = yes"/"cross-compiling = no"/ +<para><userinput>sed 's/cross-compiling = yes/cross-compiling = no/' config.make > config.make~:</userinput> This time, we're replacing <filename>cross-compiling = yes</filename> with <filename>cross-compiling = no</filename>. We do this because we are diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index b39be8a8b..be7bf6b7a 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -15,15 +15,15 @@ would do.</para> <userinput>touch /etc/ld.so.conf &&</userinput> <userinput>mkdir ../glibc-build &&</userinput> <userinput>cd ../glibc-build &&</userinput> -<userinput>sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ \</userinput> +<userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput> <userinput> ../glibc-&glibc-version;/malloc/Makefile > tmp~ &&</userinput> <userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput> -<userinput>sed "s/root/0/" ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput> +<userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput> <userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput> <userinput>../glibc-&glibc-version;/configure \</userinput> <userinput> --prefix=/usr --enable-add-ons \</userinput> <userinput> --libexecdir=/usr/bin &&</userinput> -<userinput>sed s/"cross-compiling = yes"/"cross-compiling = no"/ \</userinput> +<userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput> <userinput> config.make > config.make~ &&</userinput> <userinput>mv config.make~ config.make &&</userinput> <userinput>make &&</userinput> diff --git a/chapter06/procinfo-exp.xml b/chapter06/procinfo-exp.xml index 18a53165a..fc880cb73 100644 --- a/chapter06/procinfo-exp.xml +++ b/chapter06/procinfo-exp.xml @@ -1,7 +1,7 @@ <sect2> <title>Command explanations</title> -<para><userinput>sed "s/-ltermcap/-lncurses/" Makefile | make -f -:</userinput> +<para><userinput>sed 's/-ltermcap/-lncurses/' Makefile | make -f -:</userinput> This will replace -ltermcap with -lncurses in the Makefile and pipe the output of sed (the modified Makefile) directly to the make program. This is an alternate and more efficient way to direct the output to a file diff --git a/chapter06/procinfo-inst.xml b/chapter06/procinfo-inst.xml index 9aa8ba480..213a230a8 100644 --- a/chapter06/procinfo-inst.xml +++ b/chapter06/procinfo-inst.xml @@ -3,7 +3,7 @@ <para>Install Procinfo by running the following commands:</para> -<para><screen><userinput>sed "s/-ltermcap/-lncurses/" Makefile | make -f - &&</userinput> +<para><screen><userinput>sed 's/-ltermcap/-lncurses/' Makefile | make -f - &&</userinput> <userinput>make install</userinput></screen></para> </sect2> diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml index 4057e767f..eb9d7e579 100644 --- a/chapter06/utillinux-inst.xml +++ b/chapter06/utillinux-inst.xml @@ -5,7 +5,7 @@ adjtime file, instead of the usual /etc. To make hwclock, which is part of the util-linux package, FHS-compliant, run the following.</para> -<para><screen><userinput>sed "s|etc/adjtime\"\$|var/lib/hwclock/adjtime\"|" \</userinput> +<para><screen><userinput>sed 's|etc/adjtime|var/lib/hwclock/adjtime|' \</userinput> <userinput> hwclock/hwclock.c > hwclock~ &&</userinput> <userinput>mv hwclock~ hwclock/hwclock.c &&</userinput> <userinput>mkdir /var/lib/hwclock</userinput></screen></para> |