17 lines
252 B
Bash
Executable file
17 lines
252 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Give file as option 1
|
|
|
|
file="$1"
|
|
|
|
increasing=0
|
|
last=99999999
|
|
|
|
while read line; do
|
|
if [ "$line" -gt "$last" ]; then
|
|
increasing="$(( increasing + 1 ))"
|
|
fi
|
|
last="$line"
|
|
done < <(cat "$file")
|
|
|
|
echo "$increasing were increasing"
|