Re: tr '\verb|\|000' '\verb|\|\n'?
Johann Spies <jhspies@adept.co.za> writes:
JS> Can somebody explain the subject line to me please. I have read it in
JS> a linux training document and it is not doing what the document says
JS> it should do. What I do not understand and do not know where to find
JS> documentation on it is the '\verb|\|000' '\verb|\|\n' part. I know tr
JS> but what is '\verb|\|000'? And the use of |\|?
Are you reading this out of the source of a LaTeX document? In LaTeX,
the notation \verb|foo| means to print the foo verbatim, in a monotype
font, without interpreting any of the contents as "special" (and
backslashes are *very* special in LaTeX). More likely, the formatted
output would look like
tr '\0' '\n'
which would try to transform null bytes in the input into newlines.
JS> The whole command according to the document is
JS>
JS> cat /proc/$$/environ | tr '\verb|\|000' '\verb|\|\n'
JS>
JS> which is supposed to put each variable it shows on a separate
JS> line.
Right, that makes sense here.
--
David Maze dmaze@mit.edu http://www.mit.edu/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
Reply to: