diff options
Diffstat (limited to '')
-rwxr-xr-x | zetrename (renamed from zetrename.sh) | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,8 +1,8 @@ -#!/usr/bin/bash +#!/bin/bash # Renaming files of the format YYYYMMDDHHMMSS-title text etc.md is a massive pain, so this script does it for you. -NOTES=/home/$USER/Documents/Notes/modzet +NOTES=/home/$USER/Documents/Notes/MOD/modzet function usage { echo @@ -15,10 +15,10 @@ if [[ $# -eq 0 ]]; then usage; exit 1 fi -# path must be of form /home/$USER/Documents/Notes/modzet/20220419133511-Title of file.md +# path must be of form /home/$USER/Notes/modzet/20220419133511-Title of file.md #re='^/tmp\/Notes\/modzet\/(.{14})-(.+)\.md' -re='^/home\/lemon\/Notes\/modzet\/(.{14})-(.+)\.md' +re='^/home\/lemon\/Documents/Notes\/MOD\/modzet\/(.{14})-(.+)\.md' if [[ "$1" =~ $re ]]; then notedate=${BASH_REMATCH[1]} oldname=${BASH_REMATCH[2]} |