[parted-devel] [PATCH 2/2] doc: Add information about quoting
Brian C. Lane
bcl at redhat.com
Fri Nov 6 17:00:43 UTC 2015
Some shells (bash) will strip off the " so it needs to be
wrapped in '' to prevent it. eg.
parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M
---
doc/C/parted.8 | 4 +++-
doc/parted.texi | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index f9dfca7..f953e86 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -80,7 +80,9 @@ dvh partition tables, it should be one of "primary", "logical", or "extended".
.TP
.B name \fIpartition\fP \fIname\fP
Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
-PC98, and GPT disklabels. The name can be placed in quotes, if necessary.
+PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
+And depending on the shell may need to also be wrapped in single quotes so that
+the shell doesn't strip off the double quotes.
.TP
.B print
Display the partition table.
diff --git a/doc/parted.texi b/doc/parted.texi
index f300f66..3ff1e4f 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -628,7 +628,9 @@ $ @kbd{mkfs.vfat /dev/sdX2}
@deffn Command name @var{number} @var{name}
Sets the name for the partition @var{number} (GPT, Mac, MIPS and PC98 only).
-The name can be placed in quotes.
+The name can be placed in quotes. And depending on the shell may need to also
+be wrapped in single quotes so that the shell doesn't strip off the double
+quotes.
Example:
--
2.4.3
More information about the parted-devel
mailing list