mirror of https://github.com/mkerrisk/man-pages
proc.5: Simplify the example of printing out environ
The binutils package contains a very handy utility to print out null-byte delimited strings from a file. This can replace a rather complex expression with cat(1) provided as an example for printing out /proc/[pid]/environ. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
b6bc918e7a
commit
1391278030
|
@ -182,7 +182,7 @@ Thus, to print out the environment of process 1, you would do:
|
|||
.nf
|
||||
|
||||
.ft CW
|
||||
.RB "$" " (cat /proc/1/environ; echo) | tr \(aq\e000\(aq \(aq\en\(aq"
|
||||
.RB "$" " strings /proc/1/environ"
|
||||
.fi
|
||||
.ft P
|
||||
.in
|
||||
|
|
Loading…
Reference in New Issue