unable to select or embed shell script

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

unable to select or embed shell script Sat Apr 29, 2017 3:39 pm • by spawnreaper
Hey there, I made a shell script with the following code:

Code: Select all
#!/bin/bash

mkdir "output"

for filename in ./*.mkv
do
     mkvmerge -o "./output/$filename" --audio-tracks 4 "./$filename"
done


I named the sh script test.sh. When I run this script from terminal
Code: Select all
bash test.sh
it works.
If I add a "Run shell script" action in hazel I am unable to select my test.sh file for some reason.
If I try to embed the code I get errors all over the place and it won't run.
What am I doing wrong?
spawnreaper
 
Posts: 14
Joined: Sat Apr 29, 2017 3:31 pm

Re: unable to select or embed shell script Mon May 01, 2017 10:18 am • by Mr_Noodle
The script needs to be set to executable. Not sure why it gives you errors when embedded. You'll have to send me screenshots of it in that case.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support