aboutsummaryrefslogtreecommitdiffstats
path: root/grepjournal
diff options
context:
space:
mode:
authorMatthew Lemon <chaffinach+git@protonmail.ch>2022-01-11 21:32:49 +0000
committerMatthew Lemon <chaffinach+git@protonmail.ch>2022-01-11 21:32:49 +0000
commit5e6e4e80746b2c9fc2c2c1b5684c2658cdecbb96 (patch)
treeea4df6e33dc3aa57640e05c10e2f08825a95d15b /grepjournal
parent240101b966ed33efc2cd204493d2290fe1f9c0db (diff)
added nice lines across the console
Diffstat (limited to '')
-rwxr-xr-xgrepjournal5
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