cuetag sample.cue split-track*.flac command is the devil. It writes tags, but file names leaves stupid.
I didn't notice this when I read your post before. cuetag doesn't do the renaming. It takes info from the cue file and adds it to the audio file tags. The actual naming would usually be done with shnsplit, or something like lltag. It's hard to know what you meant by "but file names leaves stupid" in the absence of any explanation or example, but I suspect you might be referring to special characters such as accents and non Roman letters. This is a problem with character encoding (nothing to do with audio encoding!) and is easily fixed using convmv. For example convmv --notest -f utf7 -t utf8 <your_problem_file>
With this in mind I've improved my script. You no longer need lltag. Requirements are shntool, convmv, cuetag and the usual decoders for flac, wavpack, ape etc. convmv is in Debian, Fedora and Slackware so you should find it available whatever you use.
Usage is as simple as possibe
cue+lossless2flacs <cuefile>
and you can run it from any directory so it works nicely with find. For example as long as your cue+lossless collection is organised with one cue+lossless per directory then you can run find <path> -iname "*.cue" -execdir cue+lossless2flacs "{}" \+
Obviously replace <path> with the top directory of your lossless collection. You should end up with each directory still containing the original cue+lossless (I'm not happy deleting these until the output is checked but perhaps it would make sense to automatically move or rename them) and also a set of numbered, named, tagged flacs with all the names retaining their diacritic marks and other funny stuff that makes English speakers nervous. This comes with the famous Works For Me(™) Quality Assurance Warranty and is fully backed up by the 0800-URMOM tech support helpdesk (recruiting now!) and the No Monies Returned Lifetime Guarantee(™). I have tried it out using it directly and with find and it happily spits out correctly splitted flacs with names such as "09_-_Corderito, ¿por qué te escondes?.flac" or "13_-_Araujo, Juan de - Lamentación 1a. de Miércoles Santo.flac" so I hope that now file names leaves cleverly
#!/bin/bash
# cue+lossless2flacs
if [ ! $# == 1 ]; then
echo "Usage: $(basename "$0") <cuefile>"
exit
fi
CUE="$1"
TOPDIR=$(dirname "$1")
LSSLSS="$TOPDIR"/$(ls |egrep '[fF][lL][aA][cC]$|[aA][pP][eE]$|[wW][vV]$|[wW][aA][vV]$')
echo "cue file is "$1""
echo "lossless image file is "$LSSLSS""
mkdir "$TOPDIR"/tmp;
shnsplit -d "$TOPDIR"/tmp -w -f "$CUE" -t %n_-_%t -o flac "$LSSLSS";
rm "$TOPDIR"/tmp/00_-_pregap.flac;
convmv --notest -f utf7 -t utf8 "$TOPDIR"/tmp/*.flac;
cuetag "$CUE" "$TOPDIR"/tmp/*.flac;
mv "$TOPDIR"/tmp/*.flac "$TOPDIR"/;
rm -rf "$TOPDIR"/tmp;
exit
edited for typos.
edit for script correction.