简体   繁体   中英

Shell script in Automator is not working

I've just figured out how to pass variables to a shell script in Automator thanks to this post but now the script doesn't work, when in Terminal works well. I'm missing something? Tried with and without quotes. Btw the script is for converting audio to any format, in this case to m4r ringtones format.

afconvert [original-audio-file] [ringtone-file] -f m4af

Here is screenshot of automator workflow 在此输入图像描述

You probably need to tell the shell script where afconvert is installed. So, in the Terminal, type:

which afconvert

to find where it is. Then use the full path it displays inside your script, something like this:

/usr/local/bin/afconvert "$1" "$2" -f m4af
echo $1
echo $2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM