Numberation from 1 to n
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
92c9bc16f0
commit
023af993ac
@ -2,12 +2,12 @@
|
|||||||
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
||||||
LEN=${#LOGS[@]}
|
LEN=${#LOGS[@]}
|
||||||
|
|
||||||
for (( i=0; i<$LEN; i++ ));
|
for (( i=1; i<$LEN; i++ ));
|
||||||
do
|
do
|
||||||
echo "$i - ${LOGS[$i]}"
|
echo "$i - ${LOGS[$i-1]}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
read -p 'Select number to show logs: ' NUMBER
|
read -p 'Select number to show logs: ' NUMBER
|
||||||
|
|
||||||
sudo tail -f ${LOGS[$NUMBER]}
|
sudo tail -f ${LOGS[$NUMBER-1]}
|
||||||
|
Loading…
Reference in New Issue
Block a user