From 77b0f29905e2c1eaa21bf043c3f5c41aa04f4edf Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 11 Oct 2023 09:32:01 +0100 Subject: Added three tiny scripts for symbolic links The idea is to create symlinks to files that are currently being worked on, in one place. Here we can set the link, delete it and list them. --- curdel.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 curdel.sh (limited to 'curdel.sh') diff --git a/curdel.sh b/curdel.sh new file mode 100755 index 0000000..e4263cf --- /dev/null +++ b/curdel.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +curdir=~/Documents/Notes/current/ +file=$(find $curdir -type l |fzf) +echo $file + +if [[ -d $curdir ]]; then + unlink "$file" + echo "Deleted symbolic link for $file in $curdir." +else + echo "The ~/Documents/Notes/current directory does not exist. Please create it to proceed." + exit 1 +fi -- cgit v1.2.3