diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-11 21:32:49 +0000 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-11 21:32:49 +0000 |
commit | 5e6e4e80746b2c9fc2c2c1b5684c2658cdecbb96 (patch) | |
tree | ea4df6e33dc3aa57640e05c10e2f08825a95d15b /grepjournal | |
parent | 240101b966ed33efc2cd204493d2290fe1f9c0db (diff) |
added nice lines across the console
Diffstat (limited to '')
-rwxr-xr-x | grepjournal | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/grepjournal b/grepjournal index ee1d2e7..db34e0e 100755 --- a/grepjournal +++ b/grepjournal @@ -6,6 +6,10 @@ trap 'rm -f "$tmpfile"' EXIT tmpfile=$(mktemp) || exit 1 +termsize=$(stty size| awk '{print $2}') +printf "=%.0s" $(seq $termsize) +echo "" + # very bad way to check the params passed in... [[ -z "$2" ]] && [[ -n "$1" ]] && searchterm="$1" [[ -n "$2" ]] && [[ -n "$1" ]] && searchterm="$1" && flag="$2" @@ -23,6 +27,7 @@ echo -e "$(grep -R $flag "$searchterm" /home/"$USER"/Notes/journal/)" > "$tmpfil # more confirmatory text echo "Command: 'grep -R $flag $searchterm /home/"$USER"/Notes/journal/'" +printf "=%.0s" $(seq $termsize) echo "" # subsitute to get the right format using sed |