Last Updated: February 25, 2016
·
365
· fakedrake

Converting files

When converting files, especially when you are in a script you want to preserve the filename and only change the extension. Here is a nice way to do it painlessly. For example:

f="a file a really long name.uif"; uif2iso $f ${f/uif/iso}

Now dont forget that ${"some string"/string/change} will not work. You need to have a variable.