diff --git a/tools/scripts/new_sequence.sh b/tools/scripts/new_sequence.sh index 06474a5..34af796 100644 --- a/tools/scripts/new_sequence.sh +++ b/tools/scripts/new_sequence.sh @@ -45,7 +45,7 @@ esac exec 3>&1 cd $tribe -existing_seq=$(ls -d */) +existing_seq=$(ls -d [0-9][0-9]_*) nbr_seq=$(echo $existing_seq | wc -w) next_seq_number=$(expr $nbr_seq) @@ -94,7 +94,7 @@ case $selection in esac -title_path=$(echo ${title// /_} | iconv -f utf8 -t ascii//TRANSLIT) +title_path=$(echo ${title// /_} | iconv -f utf8 -t ascii//TRANSLIT | tr -cd '[:alnum:]._-') sequence_path=$tribe/$(printf "%02d" $next_seq_number)_${title_path}/ mkdir -p $sequence_path