Simply use wc for counting lines

This commit is contained in:
Jonny007-MKD 2020-02-09 16:40:17 +01:00
parent 29af3677f5
commit 9b7f6f9c21

View file

@ -5,11 +5,7 @@ if [ ! -f "$INPUT" ]; then
exit 0
fi
NUM_LINES=0
while IFS= read -r line; do
((NUM_LINES++))
done < "$INPUT"
NUM_LINES=`cat "$INPUT" | wc -l`
echo "WARNING: $NUM_LINES packages require a reboot:"
cat "$INPUT"