Simply use wc for counting lines
This commit is contained in:
parent
29af3677f5
commit
9b7f6f9c21
1 changed files with 1 additions and 5 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue