[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sed problem
From: |
Francky Leyn |
Subject: |
sed problem |
Date: |
Wed, 28 Mar 2012 18:25:48 -0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
Hello,
I have the following problem: I must write a sed script that
converts parts of groff syntax to LaTeX syntax.
eg: .BI -o gif_output_file -> \textbf{-o} \textit{gif\_output\_file}
Lets neglect the underscores for the moment.
This can be dan with
s/\.BI \([^ ]*\) \([^ ]*\)/\\textbf{\1} \\textit{\2}/
However, it also has to work for:
eg: .BI -o " gif_output_file
It doesn't: this is the output:
\textbf{-o} \textit{"} gif\_output\_file"
Of couse.
My question: how do you write it correctly in sed?
Best reagrds,
Francky
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sed problem,
Francky Leyn <=