1
vote
1answer
146 views

Sed: search and replace a patten with special characters which has a arbitrary string in between

I have a load of nfo files which I want to make some global substitutions for some values within each file e.g. a.nfo has the value <set>Tonight&apos;s Menu ( June 2012 )</set> ...
0
votes
2answers
168 views

any command that can format html or xml from shell? [closed]

There must be something on the lines of sed? Normally in sed you type something like: echo day | sed s/day/night/ the shell prints "night". Is there something that can take a file (containing ...
0
votes
3answers
182 views

Inserting the results of a for loop into an html file - BASH

I have a script that takes the results of a command and puts them into a html code. Here's what I have so far... #!/bin/bash list_dir=`ls -t downloads/` for i in $list_dir do #---- # echo ...
5
votes
4answers
8k views

Text between two tags

I wanna retrieve whatever is between these two tags – <tr> </tr> – from an html doc. Now I don't have any specific html requirements that would warrant for an html parser. I just plain ...
1
vote
1answer
120 views

how to add a description in footer

I enjoy learning how to modify files with awk, sed, and bash. However, I know it could cause issues down the road and I would like to be prepared with a log inside the file. I was thinking about how ...
0
votes
1answer
291 views

globbing, sed, or awk html files

I wanted to create a script that I could check .xhtml files for images and add alt tags if needed. While searching I found regular expressions and did man on glob but I'm unsure on where or what to ...