aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-log-grep
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-31 12:00:59 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-03-31 12:00:59 +0300
commite4f18be94261b39544ef3bc50321f6aedeb45bd6 (patch)
tree2c79daf0bdc91beb91846f00bb3d3f51236967cf /bin/ak-log-grep
parent23a61661f03c03a357ad8aa47ba3595fabe24de1 (diff)
downloadarching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.gz
arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.tar.bz2
arching-kaos-tools-e4f18be94261b39544ef3bc50321f6aedeb45bd6.zip
huge refactor, might breaking things
Diffstat (limited to 'bin/ak-log-grep')
-rwxr-xr-xbin/ak-log-grep21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/ak-log-grep b/bin/ak-log-grep
new file mode 100755
index 0000000..685cd0e
--- /dev/null
+++ b/bin/ak-log-grep
@@ -0,0 +1,21 @@
+#!/bin/bash
+PROGRAM="$(basename $0)"
+descriptionString="Shows a menu to grep logfile for selected script"
+source $AK_LIBDIR/_ak_script_description
+if [ ! -z $1 ] && [ -n "$1" ]
+then
+ if [ "$1" == "-h" ] || [ "$1" == "--help" ]
+ then
+ description
+ echo "Launch with no arguments and select from the menu that will appear"
+ exit 1
+ fi
+fi
+
+echo "The following scripts have entries in the log file."
+echo "Select one of those by entering the number of it below and hit enter:"
+select x in $(cat $AK_LOGSFILE | cut -d ' ' -f 2 | sort | uniq)
+do
+ grep $x $AK_LOGSFILE
+ break
+done