summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/mvtu
blob: 6160507f67c8a690a4bbc3e232b93ce6cb2b1978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# MV Time-Uuid

find "$@" -type f -execdir sh -c '
	file="$(basename "$1")"
	ext="${file##*.}"
	if [ "$ext" != "$file" ]; then
		dest="$(time-uuid).$ext"
	else
		dest="$(time-uuid)"
	fi
	[ -e "dest" ] || mv -v -- "$1" "$dest"
' shell '{}' \;
hl kwa">for i in $(seq "$OPTARG"); do tz_to="$(tzselect),$tz_to" done;; T) tz_to="$OPTARG,$tz_to";; \?) exit 1;; esac done shift $((OPTIND-1))