diff options
| author | Mitsuo Tokumori <[email protected]> | 2024-09-11 04:25:38 +0900 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2024-09-11 04:25:38 +0900 |
| commit | 37ff7062874b72bafa99afe661f42653565ed511 (patch) | |
| tree | 60372bf7fdb94c9034c7d1cc5a17cd7df526c4fc /public/.local/bin/rename_pictures.sh | |
| parent | dca319b8d9d221f1aaf3a00ee457d202096c66ac (diff) | |
| download | dotfiles-37ff7062874b72bafa99afe661f42653565ed511.tar.gz dotfiles-37ff7062874b72bafa99afe661f42653565ed511.tar.bz2 dotfiles-37ff7062874b72bafa99afe661f42653565ed511.zip | |
RESTRUCTURE. Replicate relative paths in public/
Diffstat (limited to 'public/.local/bin/rename_pictures.sh')
| -rwxr-xr-x | public/.local/bin/rename_pictures.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/.local/bin/rename_pictures.sh b/public/.local/bin/rename_pictures.sh new file mode 100755 index 0000000..a3f2463 --- /dev/null +++ b/public/.local/bin/rename_pictures.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Very specific script to bulk rename pictures with some format +# (complex script for a simple task) + +exit # just in case + +shopt -s nullglob +for file in ss_*.png; do + date_part="${file:3:8}" + time_part="${file:12:6}" + new_name="ss-${date_part}T${time_part}0500.png" + + mv "$file" "$new_name" +done +shopt -u nullglob |
