scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

commit 22208ab1ab853f84d84377d345aced6a0d1f71e8
parent 9f1d038752b4a660df5d8a65303487f7b5e01502
Author: gearsix <gearsix@tuta.io>
Date:   Sun,  3 Apr 2022 13:38:36 +0100

added unfinished directory to nix

Diffstat:
Anix/unfinished/bulk-rename.sh | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/nix/unfinished/bulk-rename.sh b/nix/unfinished/bulk-rename.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +# renames all *toml, *json, *yaml files in content to */meta.{toml,json,yaml} + +for f in $(find $1 -name *toml -o -name *json -o -name *yaml); do + oldn=$(basename $f ${f:(-5):5}) + newn=${f/\/$oldn./\/meta.} + echo "$f -> $newn" +done +\ No newline at end of file