Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a little help converting a short script from .bat to .sh

@IF %1 == "" GOTO end
imf_copy -p %1 ""
@GOTO convertfile
@ECHO Done!

imf_copy is a Maya Plugin. Basically its function is to convert .tiff files into .map files. A .map file basically works in conjunction with Maya's mental ray to create an image map which will only load the images that are within the active camera's view.

I found it for PC but can't find its Mac OS X counterpart.

share|improve this question

Something like


# run imf_copy <file> <file with extension changed to .map>
# for every file passed on the command line
for arg in "$@"; do
    imf_copy -p "$arg" "${arg%.*}.map"

echo ''
echo 'Done!'

# consider removing this

This is a literal translation.

You probably don't really want the read line, which was probably only there so that if the DOS batch script started a new window, the window would stay open until the user pressed Enter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.