[OS X TeX] question concerning sed and $

Rechtsanwalt Friedrich Vosberg vosberg at meinrechtsanwalt.com
Tue Apr 4 23:28:55 CEST 2006


Morning.

At a server I have to save files the name of directories have a
structure like:

   /Volumes/DirABC$/Procter & Gamble/...

How should I modify the following example that it works with ampersands
and $ signs too?

===== 8>< =====
\documentclass{ltxdoc}
\usepackage{xspace}
\begingroup
\let\\\relax
\immediate\write18{pwd | sed -e 's/&/\\&/g' | iconv -f UTF-8-MAC -t
MacRoman | awk -F'\\n' '{print "\\newcommand{\\fvpath}{" $1
"\\xspace}"}' > tmppath.tex}
\endgroup
\input{tmppath.tex}
\begin{document}
\fvpath
\end{document}
===== ><8 =====

TIA and kind regards. Friedrich

--
Rechtsanwalt Friedrich Vosberg
Alt-Oetzsch 4, 04416 Markkleeberg
Ruf: 0341 3502074   Mobil: 0174 1602887
Fax: 0341 3502075   http://www.meinrechtsanwalt.com




------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list