Jakeman90210
Jakeman90210

Reputation: 1

"Unspecified Exception" when running .command bash script

I've created a bash script to play some music using the afplay command. I used the file extension .command so that it can be opened with a double click in finder. This is an abbreviation of the code.

#! /bin/bash

afplay playlist/01.m4a

The script works when I manually run it through terminal, but when I open the .command file through finder all I get is,

admins-iMac:~ user$ /Users/admin/Documents/bash/music.command ; exit;
Unspecified exception
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

And no music is played. Any help would be appreciated.

Upvotes: 0

Views: 519

Answers (1)

childno͡.de
childno͡.de

Reputation: 4826

No clue why but: afplay my played fine while mv my{,.mp3} && afplay my.mp3 won't and will exit with "Unspecified exception"

Upvotes: 0

Related Questions