mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
12 lines
388 B
Bash
Executable file
12 lines
388 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
for file in "$@"; do
|
|
name="${file##*/}";
|
|
if [[ ! "$name" =~ \.[0-9a-fA-F]{32}\. ]]; then
|
|
prefix="${file%.*}";
|
|
suffix="${file##*.}";
|
|
uuid=$(cat /proc/sys/kernel/random/uuid | tr -d "-");
|
|
echo "$file" uuidifying
|
|
mv -v "$file" "${prefix}.${uuid}.${suffix}";
|
|
fi
|
|
done
|