<commit_before><commit_msg>1st version of imovie_rename<commit_after>#!/bin/bash
# require bash version 4.3 or newver
# script for renaming imovie files from YYYY-MM-DD HH_MM_SS.ext to
# YYYYMMDD-HHMMSS_AAA NNNNNN-XX.ext

name_suffix="ANBHDV020"
count=1
#read -p "New file suffix: " $name_suffix

while getopts s: option; do
	case $option in
		s) name_suffix=$OPTARG;;
	esac
done

for file in "$@"
do
  file_new=${file//-/}
  file_new=${file_new//_/}
	file_new=${file_new// /-}
	seq=$(printf "%02d" $count)
  file_new=${file_new/./_ANB $name_suffix-$seq.}
  echo mv "'$file'" "'$file_new'"
	count=$((count+1))
done
{'fraction_non_alphanumeric': 0.16449511400651465, 'fraction_numerical': 0.016286644951140065, 'mean_word_length': 4.6422018348623855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1834443', 'n_tokens_mistral': 270, 'n_tokens_neox': 257, 'n_words': 59}