17 lines
201 B
Bash
17 lines
201 B
Bash
|
#!/bin/bash
|
||
|
last=0
|
||
|
max=0
|
||
|
inc=0
|
||
|
|
||
|
while read line; do
|
||
|
if [[ $line -gt $max ]]; then
|
||
|
max=$line
|
||
|
inc=$((inc+1))
|
||
|
elif [[ $line -gt $last ]]; then
|
||
|
inc=$((inc+1))
|
||
|
fi
|
||
|
last=$line
|
||
|
done
|
||
|
|
||
|
echo $((inc-1))
|