]> git.codecow.com Git - Monocypher.git/commitdiff
Quotes, use cat so the sed train runs strictly left to right
authorMichael Savage <mikejsavage@gmail.com>
Sat, 28 Dec 2019 23:47:39 +0000 (01:47 +0200)
committerMichael Savage <mikejsavage@gmail.com>
Sat, 28 Dec 2019 23:47:47 +0000 (01:47 +0200)
doc/extract_examples.sh

index 6805c4ae4a6e37611e3ffc9f37a20bd5092d718f..bda04d02cdd88329ba31d955e7944e83fd506916 100755 (executable)
@@ -71,7 +71,7 @@ for f in man/man3/*.3monocypher man/man3/optional/*.3monocypher; do
        # and can't be tested like this
        if [ ! -h "$f" ] && [ "$f" != "man/man3/crypto_sign_init_first_pass_custom_hash.3monocypher" ]; then
                echo "// $f"
-               sed -n "/^\.Bd/,/^\.Ed/p" < $f | sed "s/\.Bd.*/{/" | sed "s/\.Ed/}/"
+               cat "$f" | sed -n "/^\.Bd/,/^\.Ed/p" | sed "s/\.Bd.*/{/" | sed "s/\.Ed/}/"
        fi
 done