4
votes
5answers
73 views

Insert Lines after Multi-Line Regex Match

I've got an XML file I need to append to after a specific set of tags. Basically the file structure looks like this: <key>servers</key> <dict> ... Server Details ... </dict> ...
2
votes
1answer
204 views

Convert xml subtitle file to srt format

I have a xml subtitle that looks like this: <?xml version="1.0" encoding="utf-8" ?><transcript> <Item from="1.16" duration="4.68"><![CDATA[(Dong-hyuk is coming to see you now.) ...
2
votes
1answer
61 views

Substite values from file1 to file2 awk

I have input file in xml FILE1 : <Sector sectorNumber="1"> <Cell cellNumber="1" cellCreated="YES" cellIdentity="" cellRange="35000" numberOfTxBranches="1" hsCodeResourceId="0"/> ...
4
votes
2answers
67 views

How to add a line from a list into another file when a specified line is found?

Basically I have 2 files. One has a list of router and switch login prompts, like this: user@router1 user@router2 user@switch1 user@switch2 The other file has blocks of XML, like this: ...
0
votes
2answers
180 views

How to delete a line containing pattern which is first found after a specific pattern

I am writting a shell script to delete an entry from a specific group. eg: file name is dest.xml <domain id="1" group_name="group1"> <node id="ABC"> <node id="PQR"> ...
0
votes
2answers
585 views

How to find and replace a particular string in a specific line

I developed a code which find and replaces a specific string in all xmls under all subdirectories. But i dont want all occurances to be replaced. In entire xml, code should find the tag xyz and ...
9
votes
1answer
1k views

Vim: Making XML text “pretty”

Is there an easy way within vi to make your XML text "pretty"? For example: I want this.. <person> <name>Nick</name> <age>26</age> ...
1
vote
2answers
414 views

Text processing: convert text of table of content into djvu bookmark format?

Usually in the table of content of a book, each line is for a chapter or section and ended with its page number, for example, 1 first chapter 10 1.1 first section 11 1.1.1 first subsection 12 1.2 ...
3
votes
4answers
320 views

Shell script or command to Strip text and Binary files excerpts from large Log Files

I need to remove a large binary file (PDF file) from a large log file which is generated daily.This is seriously hogging space on our servers.I need to remove the large PDF from the logs to make the ...
7
votes
2answers
973 views

Parsing XML's , JSON's and newer data file formats in UNIX using command line utilities

Unix environment has some excellent tools for parsing text in various forms. However off late the data is not in the regular set of formats(CSV,TSV,Record based or some other delimiter based) it used ...