Add a comment about nested command substitution

"The command below shows an example of nested command substitution
 using two methods: backquotes and a $() construct. It could be
 rewritten using the same method for both substitutions, but is
 shown this way to demonstrate how they can be mixed. Generally
 the $() method is preferred."
This commit is contained in:
Bruce Dubbs 2023-01-26 10:40:42 -06:00
parent c349b4a2b3
commit adba2dae8a

View File

@ -208,6 +208,14 @@ cd build</userinput></screen>
header using a command that is identical to what the GCC build system does header using a command that is identical to what the GCC build system does
in normal circumstances:</para> in normal circumstances:</para>
<note>
<para>The command below shows an example of nested command substitution
using two methods: backquotes and a $() construct. It could be rewritten
using the same method for both substitutions, but is shown this way
to demonstrate how they can be mixed. Generally the $() method is
preferred.</para>
</note>
<screen><userinput remap="install">cd .. <screen><userinput remap="install">cd ..
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h</userinput></screen> `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h</userinput></screen>