UNIX one-liner to convert .dia files in batch-mode

UNIX one-liner to convert .dia files to PNG (e.g. when switching from LaTeX to pdflatex):


for f in *.dia ; do dia $f -e "${f/.dia/.png}" ; done

Advertisements
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

One Response to UNIX one-liner to convert .dia files in batch-mode

  1. gleet_tweet says:

    I’m a fan of unix one-liners, and make plenty of use of "for f in * ; do stuff ; done", but I didn’t know about the implicit sed in the shell variable. Neat! I shall try to remember that!

Please leave a response

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s