[parted-devel] [PATCH 2/2] doc: Add information about quoting

Brian C. Lane bcl at redhat.com
Thu Jun 16 00:23:25 UTC 2016


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 41baa1a..eb7cd98 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -82,7 +82,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.5.5




More information about the parted-devel mailing list