1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Added linky and uuidify

This commit is contained in:
Tony Tkáčik 2025-06-24 23:38:27 +02:00
parent 5dcb3024c4
commit 2bf96feb5e
2 changed files with 60 additions and 0 deletions

12
bin/uuidify Executable file
View file

@ -0,0 +1,12 @@
#!/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