From eadebe8d332562b13a1375b08170d4c4348a1869 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:14:05 -0700 Subject: [PATCH] Add wrapper file renaming script --- bin/rename_and_move.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/rename_and_move.sh diff --git a/bin/rename_and_move.sh b/bin/rename_and_move.sh new file mode 100755 index 0000000..d1d406c --- /dev/null +++ b/bin/rename_and_move.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +print_help() { + cat < + +See rename_for_shell.sh for more details on the renaming mechanics. Does not +work if the directory also has a bad name + +EXAMPLES: + fd -x rename_and_move.sh +HELP +} + +if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then + print_help + exit 1 +else + mv -n "$@" "$(~/.configs_pointer/bin/rename_for_shell.sh "$@")" &>/dev/null +fi