The script itself seems okay (apart from some if-then-else-fi's in case of errors)The only tip I can give you if you want to debug the script yourself is: put a set -x before the commands you want to debug and set +x after the last command. If you want to debug the entire script, which might produce quite a lot of output, put it right below the #!/bin/bash line.

The script itself seems okay (apart from some if-then-else-fi's in case of errors)The only tip I can give you if you want to debug the script yourself is: put a set -x before the commands you want to debug and set +x after the last command. If you want to debug the entire script, which might produce quite a lot of output, put it right below the #!/bin/bash line.

Thanks like I said complete beginner to scripting so I need all the help I can get!

So calling the command "cd mp3" in the script might not be the best way to do that, as some directory might not contain a "mp3" dir. Putting the full path in the output variable would be the best way to go there.

Also, when running the command from /usr/local/bin or cron or other places than your own directory, or if your running it as another user, you could have $PATH issues, IE: commands might not be in your path.

echo $PATH

Many times, simply putting the full path to every command you call can fix those issues.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum