rod mclaughlin


A script to modify an HTML file (24 mar 10)

#!/bin/bash

# Takes an HTML file as a parameter, enclosing everything in a box in the center of the page
perl -i -pe s/\\\<table\\\ /\\\<fieldset\\\>\\\<center\\\>\\\<table\\\ width\\\=\\\'90%\\\'\\\ /gi $1
perl -i -pe s/\\\/table/tablecenter/gi $1
perl -i -pe s/tablecenter/\\\/tablecenter/gi $1
perl -i -pe s/tablecenter/table\\\<\\\/center/gi $1
perl -i -pe s/table\\\</table\\\>\\\</gi $1
perl -i -pe s/\\\/center\\\>/\\\/center\\\>\\\<\\\/fieldset\\\>/gi $1



Back
Portland London