From: Roy Marples Date: Tue, 30 Sep 2014 14:01:22 +0000 (+0000) Subject: Document the possible use of eval. X-Git-Tag: v6.5.0~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd23f55d2afb42d0664f7d5d6cd52a693bcb4981;p=thirdparty%2Fdhcpcd.git Document the possible use of eval. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index 1c136887..92582f4e 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -218,7 +218,8 @@ or .Pp .Nm sanitises each string variable passed from the DHCP/RA message by encoding non -printable characters in escaped octal and escaping the following characters: +printable characters in C style where possible, or escaped octal when not. +The following characters are also escaped in C style (except for $ in octal): .D1 | \*[Am] \&; \*[Lt] \*[Gt] \&( \&) $ ` \e \*q ' \ \*[Lt]tab\*[Gt] \*[Lt]newline\*[Gt] .D1 * \&? \&[ # ~ = % @@ -237,6 +238,15 @@ character octal escaped and C style encoding you can do this: .D1 dhcpcd-decode -s \*q$variable-name\*q or .D1 printf \*q%s\*q \*q$variable_name\*q | unvis | vis -c +.Pp +If you have neither +.Xr dhcpcd-decode 8 +or a working +.Xr unvis 1 , +then the shell builtin eval could be used: +.D1 eval \*q$variable_name\*q +but that does not work well with any non printable characters and the $ +character. .Ss Fine tuning You can fine-tune the behaviour of .Nm