About | FAQ | Help
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how can I use apostrophe in a command statment (within exec)

the problem is shown here a part of a init.pp file

exec{ "join_domain": command => "/opt/pbis/bin/domainjoin-cli setname hostname", command => "/opt/pbis/bin/domainjoin-cli join --notimesync --ou "OU=Servers,OU=BLP,OU=Admin,DC=ISTINT,DC=NET" istint.net <domain admin="" username="">",

command => "/opt/pbis/bin/config LoginShellTemplate /bin/bash", command => "/opt/pbis/bin/config AssumeDefaultDomain true", command => "/opt/pbis/bin/config RequireMembershipOf istint\ar_blp_linux_user", command => "/opt/pbis/bin/config SyncSystemTime false", }

the second command statment have "OU=Servers,OU=BLP,OU=Admin,DC=ISTINT,DC=NET" as a parameter and it comes with apostrohes

any suggestions how to mask these?

Thanks -Stefan

click to hide/show revision 2
No.2 Revision

how can I use apostrophe in a command statment (within exec)

the problem is shown here a part of a init.pp file

exec{ "join_domain":
command => "/opt/pbis/bin/domainjoin-cli setname hostname",
`hostname`",
command => "/opt/pbis/bin/domainjoin-cli join --notimesync --ou "OU=Servers,OU=BLP,OU=Admin,DC=ISTINT,DC=NET" istint.net <domain admin="" username="">",

admin username>",

command => "/opt/pbis/bin/config LoginShellTemplate /bin/bash", command => "/opt/pbis/bin/config AssumeDefaultDomain true", command => "/opt/pbis/bin/config RequireMembershipOf istint\ar_blp_linux_user", istint\\ar_blp_linux_user", command => "/opt/pbis/bin/config SyncSystemTime false", }

}

the second command statment have "OU=Servers,OU=BLP,OU=Admin,DC=ISTINT,DC=NET" as a parameter and it comes with apostrohes

any suggestions how to mask these?

Thanks -Stefan