Open main menu

Linux and Unix Users Group at Virginia Teck Wiki β

Changes

Reencoding MediaWiki pages

251 bytes added, 08:27, 3 January 2019
no edit summary
=Running=
The following command will create ==One-Shot==Replace <code>input.html</code> and <code>out.wikitext files of the HTML files for your cut and paste convenience</code> with appropriate filenames.
<pre>
sed -rn -e '/<!-- start content -->/,/<!--/p' input.html | sed -r -f script > out.wikitext</pre> ==Batch==The following command will create .wikitext files of all the HTML files in the current directory for your cut and paste convenience.<pre>for f in *.html ; do $( sed -rn -e '/<!-- start content -->/,/<!--/p' "$f " | sed -r -f script > "$f.wikitext " ) ; done
</pre>