Some unix tricks for dos files
Often we have got files, which originate from m$ programs.
1)
msword documents I wanted to make into html. There is a program called
mswordview, and it can convert and copy the files by doing:
for file in *.doc; do mswordview $file > ${file%.doc}.html; done
2)
The extensions are often wrong. They can be changed:
for file in *.HTM; do cp $file ${file%.HTM}.html; done
3)
To get lowercase letters for capitals:
for file in *HTM; do cp $file `echo $file | tr A-Z a-z`; done
The first trick was told by:
Matthew Dalton <matthewd@research.canon.com.au>
The third trick was told by:
Peter S Galbraith <GalbraithP@dfo-mpo.gc.ca>
And the second I wrote myself according to Matthew Dalton's model for
msword tranforming.
hvirtane@cc.jyu.fi
Reply to: