Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

2 total

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
2 total