From: Paul Sarena Date: Fri, 26 Nov 2021 23:34:02 +0000 (-0800) Subject: Escape ((…)) in AsciiDoc to fix broken example X-Git-Tag: v2.38-rc1~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3819419ed9694ad083cfc7105dafc2a88c2f726b;p=thirdparty%2Futil-linux.git Escape ((…)) in AsciiDoc to fix broken example 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` --- diff --git a/misc-utils/wipefs.8.adoc b/misc-utils/wipefs.8.adoc index 372c29c44f..a3840b0952 100644 --- a/misc-utils/wipefs.8.adoc +++ b/misc-utils/wipefs.8.adoc @@ -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-.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