25 lines
444 B
Bash
Executable File
25 lines
444 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eEou pipefail
|
|
|
|
main() {
|
|
local input="${1}"
|
|
local line_count=0
|
|
while read -r line; do
|
|
# To satisfy the `set -u` incantation at the top, we have to assign the variable instead of
|
|
# a simple ((line_count++))
|
|
line_count=$((line_count + 1))
|
|
if ((line_count % 2 == 0)); then
|
|
printf "%s\n" "$line"
|
|
fi
|
|
done <"$input"
|
|
|
|
if ((line_count > 10)); then
|
|
printf "big\n"
|
|
else
|
|
printf "small\n"
|
|
fi
|
|
}
|
|
|
|
main "${@}"
|