text/midline
- 345 bytes
- Bash
- View raw
1#!/usr/bin/env bash
2# This script prints the middle line of a file (approximately).
3#
4# I use it to do binary searches on a file.
5#
6# See https://www.unix.com/unix-for-dummies-questions-and-answers/248556-find-display-middle-line-file-using-single-line-command.html
8set -o errexit
9set -o nounset