# 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
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)
You need to create an account or log in to post comments to this site.
Related Posts
» Notifications from shell scr... in shell osx mac bash script unix gui notification
» Search with man less in shell osx mac search bash unix manpage less
» Record terminal sessions wit... in shell osx mac bash script unix terminal session record ttyrec
» cat as a script in shell osx mac bash script unix cat
» Scripting mplayer playlists ... in shell osx mac bash script unix linux mplayer web video internet youtube playlist playmovs mixmovs newpldir openpl playone
» Get full path to executing s... in shell osx mac bash script unix file running directory path full absolute executing
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails