diff options
author | Matthew Lemon <y@yulqen.org> | 2023-04-04 17:36:52 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-04-04 17:36:52 +0100 |
commit | af2c637346bb3a0cac2e21a7afa8a908a0b948f6 (patch) | |
tree | 73a0af195c8eb316f4eff9792c3e702ea85c4fb4 | |
parent | 666974d3ba456ef39aa00b4ababe23fcc5a804f5 (diff) |
fix path
-rwxr-xr-x | grepjournal | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/grepjournal b/grepjournal index 15ce524..bc90cdb 100755 --- a/grepjournal +++ b/grepjournal @@ -1,11 +1,11 @@ #!/bin/bash -# Search ~/Notes/journal for a term and return as a markdown list sorted by date. +# Search ~/Documents/Notes/journal for a term and return as a markdown list sorted by date. function usage { echo echo "Usage: grepjournal [WORD] [-i (case insensitve)] [-h (display this help)]" - echo " Searches for WORD within all files within ~/Notes/journal. Displayed sorted by date." + echo " Searches for WORD within all files within ~/Documents/Notes/journal. Displayed sorted by date." } if [[ $# -eq 0 ]]; then @@ -82,17 +82,17 @@ if [[ $flag != "-i" ]]; then fi # do the business, starting with using grep to get the pertinent lines -echo -e "$(grep -R $flag "$searchterm" /home/"$USER"/Notes/journal/home)" > "$grepped_results" +echo -e "$(grep -R $flag "$searchterm" /home/"$USER"/Documents/Notes/journal/home/)" > "$grepped_results" # more confirmatory text -echo "Command: 'grep -R $flag $searchterm /home/"$USER"/Notes/journal/home'" +echo "Command: 'grep -R $flag $searchterm /home/"$USER"/Documents/Notes/journal/home/'" printf "=%.0s" $(seq $termsize) echo "" # because I can't get the regex right, I am searching for http or https to indicate a link in a line urlregex="https?" -re='(^/home/lemon/Notes/journal/home/([0-9]{4})-([0-9]{2})-([0-9]{2})\.md):-\s([0-9]{2}:[0-9]{2}):\s(.*)' +re='(^/home/lemon/Documents/Notes/journal/home/([0-9]{4})-([0-9]{2})-([0-9]{2})\.md):-\s([0-9]{2}:[0-9]{2}):\s(.*)' declare -A processed_lines |