more as a script
# Author: Steve Stock # http://www.linuxjournal.com/article/7385 (comments) shmore() { LINES="" while read -d $'\n' line; do printf "%s\n" "$line" #echo "$line" LINES=".${LINES}" if [[ $LINES == "......................." ]]; then echo -n "--More--" read < /dev/tty LINES="" fi done return 0 } shmore < file.txt