Personal tools
You are here: Home → Adding pages → Script for stripping html pages
Navigation
Contact information

uit

University of Tromsø

Department of Chemistry

9037 Tromsø, Norway

 
Document Actions

Script for stripping html pages

Removing all but the <body> of all html files in a directory can be done with the following shell command

for a in *.html; do 
echo -e '/.*<body.*/\n1,. d\n/.*<\/body.*/\n.,$ d\nw\nq\n' | ed -s $a; 
done 
Monday, February 05, 2007  | Permalink |  Comments (0)
Adding pages
« May 2008 »
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: