New to the Mac? Check out TUAW's Mac 101

Use AbiWord to convert filetypes on the command line

AbiWord can convert documents in one format (it doesn't have to be AbiWord, just a format AbiWord supports) to OpenOffice.org Writer, or Word, or any of a heck of a lot other formats. Even better, you can do these conversions via the command line. For instance, let's say you have a Word document named foo.doc, and you want to convert it to AbiWord format without having to open the program.

$ abiword --to=abw foo.doc

You'll have a document named foo.doc and one named foo.abw. What if you wanted the new document to have a different name too? Just use this:

$ abiword --to=bar.abw foo.doc

The process is the same if you want to convert foo.doc to OpenOffice.org Writer.

$ abiword --to=sxw foo.doc

And so on. You can use several different formats, including zabw, rtf, txt, utf8, html, latex, & many, many more. Just open up AbiWord, go to Save As, & take a look at the various formats supported.

Of course, the real power comes in when you write a simple script to batch process a bunch of docs.

for i in * ; do abiword --to=abw $i ; done

This would convert all documents in a directory to AbiWord format. If you find yourself doing this over and over again, make an alias.

Pretty cool, eh?

(Check out all of my posts on AbiWord.)

Reader Comments

(Page 1)
concepts
blogging (1)
books (2)
howto (0)
humor (1)
licensing (0)
networking (2)
odf (1)
presentations (1)
programming (1)
review (2)
rss (1)
security (6)
switching (0)
wireless (1)
distros
auditor (1)
debian (2)
fedora core (2)
k/ubuntu (12)
knoppix (2)
libranet (1)
mac os x (2)
solaris (1)
suse (3)
format
flac (1)
mp3 (1)
odf (0)
ppt (0)
hardware
cpu (0)
dvd (1)
keyboard (1)
mouse (1)
printing (1)
microsoft
bullying (0)
ntfs (1)
office (2)
windows (3)
multimedia
imagemanagement (1)
music (3)
podcast (1)
rip-mix-burn (1)
video (0)
people
daveraggett (1)
ericmeyer (1)
software
amarok (0)
azureus (3)
bash (4)
bittorrent (4)
bloglines (1)
clamav (1)
css (1)
ethereal (1)
firefox (11)
gmail (1)
gnome (3)
html (1)
java (2)
kde (2)
kmail (1)
openoffice.org (3)
picasa (1)
regex (1)
rubyonrails (1)
ssh (3)
thunderbird (0)
vim (3)
vmware (0)
wordpress (1)
companies
google (2)
microsoft (0)
novell (0)
red hat (0)
sun (1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: