@@ -1231,13 +1231,12 @@ echo @foo@
12311231 <term><function>stripHash</function>
12321232 <replaceable>path</replaceable></term>
12331233 <listitem><para>Strips the directory and hash part of a store
1234− path, storing the name part in the environment variable
1235− <literal>strippedName</literal>. For example:
1234+ path, outputting the name part to <literal>stdout</literal>.
1235+ For example:
12361236
12371237<programlisting>
1238−stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
12391238# prints coreutils-8.24
1240−echo $strippedName
1239+stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
12411240</programlisting>
12421241
12431242 If you wish to store the result in another variable, then the
@@ -1245,7 +1244,7 @@ echo $strippedName
12451244
12461245<programlisting>
12471246name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
1248−someVar=$(stripHash $name; echo $strippedName)
1247+someVar=$(stripHash $name)
12491248</programlisting>
12501249
12511250 </para></listitem>