]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Escape ((…)) in AsciiDoc to fix broken example
authorPaul Sarena <paul@sarena.ca>
Fri, 26 Nov 2021 23:34:02 +0000 (15:34 -0800)
committerGitHub <noreply@github.com>
Fri, 26 Nov 2021 23:34:02 +0000 (15:34 -0800)
In AsciiDoc, double parentheses are used to mark flow index terms, but in this document, their use is intended to be interpreted by the shell's arithmetic expansion.  By escaping them with a backslash in the AsciiDoc, they pass through as-is to the manpage and other targets.

So, instead of a rendered result of `dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$0x00000438 bs=1 conv=notrunc`, we get `dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc`.

Seperately, when interpreted by a shell's arithmetic expansion, the 0x00000438 hex is converted to decimal 1080 `dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=1080 bs=1 conv=notrunc`

misc-utils/wipefs.8.adoc

index 372c29c44f4404261a20d910ab7ea1deac4508a1..a3840b0952e6ce351b491b58e3955ca691038912 100644 (file)
@@ -97,7 +97,7 @@ Prints information about sda and all partitions on sda.
 *wipefs --all --backup /dev/sdb*::
 Erases all signatures from the device _/dev/sdb_ and creates a signature backup file _~/wipefs-sdb-<offset>.bak_ for each signature.
 
-*dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc*::
+*dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$\((0x00000438)) bs=1 conv=notrunc*::
 Restores an ext2 signature from the backup file _~/wipefs-sdb-0x00000438.bak_.
 
 == AUTHORS