Thanks, that looks like just the right thing :-)
But, how do I execute it?
I've saved it as
split.sh, added
#!/bin/bash at the beginning and chmod'ed it
777, then tried to run it (both as normal user and as root) with
./split.sh, but I only get
bash: ./split.sh: Permission denied or
bash: ./split.sh: /bin/bash: bad interpreter: Permission denied
I've also tried to run it without the #!/bin/bash, but it won't run.
edit: I just ran it from the commandline now, and it seems to be working, kinda. I ran it in a directory I made for testing, and it seems like it fails when it tries to
cd "$splitdir".
If I change the command to
echo "$splitdir", I get this output:
./Iron Maiden/1980 Album - Iron Maiden [GIR - FLAC - 1998 remaster]/split. I guess the problem here is that spaces needs to be escaped. Any input on that?
All the FLAC-files in my test directory were deleted however, so I guess it was wise to test it first, hehe. I also have a backup of everything else, in case something goes wrong when the script is ready to do it's job