A collection of shell scripts I use to automate my tasks.
This software is distributed under the Creative Commons Zero License. By using it you consent to the terms and conditions in the latter license.
Generates an M3U playlist file by scanning a specified directory for files.
- bash, sed, awk
- Unix OS (running under cygwin/MinGW on Windows has not been tested but should work in theory)
Copy the script anywhere on your path (for example in /bin) and set executable permissions (755).
generate-playlist.sh [DIRECTORY] [PLAYLIST]
DIRECTORY - optional, default is "." (the current directory)
PLAYLIST - optional, if omitted, a timestamped filename will be generated
The program will ask for confirmation before scanning the directory. You can execute it without the pause like so:
echo y | generate-playlist.sh