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!)

more as a script (See related posts)

# 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

You need to create an account or log in to post comments to this site.