myhome/.local/bin/emerge-logs
Marcin Woźniak 023af993ac
Numberation from 1 to n
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2020-11-23 13:56:00 +01:00

14 lines
262 B
Bash
Executable File

#!/bin/bash
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
LEN=${#LOGS[@]}
for (( i=1; i<$LEN; i++ ));
do
echo "$i - ${LOGS[$i-1]}"
done
echo
read -p 'Select number to show logs: ' NUMBER
sudo tail -f ${LOGS[$NUMBER-1]}