Search for bold text in Bash?
Search for bold text in Bash?
Is there any way to search in bash (maybe grep or sed?) for text that would be bold in say a word document, ABI Word document or maybe Libre or Open Office documents? What I'm really looking to do is identify bold text and copy the text and page # to a new file. Basically, saving me the time of creating a directory on a 200+ page document.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Search for bold text in Bash?
created an abiword text file slavvo67.abw containingslavvo67 wrote:Is there any way to search in bash (maybe grep or sed?) for text that would be bold in say a word document, ABI Word document or maybe Libre or Open Office documents? What I'm really looking to do is identify bold text and copy the text and page # to a new file. Basically, saving me the time of creating a directory on a 200+ page document.
a bold text
and made bold the word bold
Open the the abw file in text editor geany and you will see how abiword is storing "bold". Then you might use grep.
Code: Select all
# grep font-weight:bold slavvo67.abw
Code: Select all
<p style="Normal" xid="2"><c>a </c><c props="font-weight:bold">bold</c><c> word</c></p>
#