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

Search with man less

# use n or N to iterate through matches
# [esc-u] turns off search highlighting

man bash | less -p 'ARITHMETIC EVALUATION'   
man bash | less -p 'Arithmetic Expansion'

help let

help test | sed -E "s/(Arithmetic tests)/$(printf '\e[1m\\1\e[m')/"
2 total