baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
[BL] Shell Collection bmore.sh - wrapper for /bin/more
- From: Lee Forrest <lforrestster AT gmail.com>
- To: baslinux AT lists.ibiblio.org
- Subject: [BL] Shell Collection bmore.sh - wrapper for /bin/more
- Date: Mon, 12 Feb 2007 20:11:59 +0000
#!/bin/sh
# bmore.sh
# usage: bmore.sh file1 file2 file3...
# this simple script makes more more usable, for people who don't
# want to mess with a large and complex pager like less with
# the option to edit and search the file you are displaying - I
# assume that your editor has search capababilities and can take
# a list of files
# I have this script aliased to "more"
# the screen doesn't clear when you exit the script becuase
# this gives you the option of using the screen memory
# (Shift-PageUp/PageDown) to access more of the document with the
# commandline at your disposal
# if necessary, change this to your favorite editor:
editor=/usr/bin/nvi
/bin/more "$@"
while : ; do
echo
read -p "[p]age [e]dit-search [q]uit :" choice
case "$choice" in
"p") /bin/more "$@" ;;
"e") $editor "$@" ;;
"q") exit ;;
*) continue ;;
esac
done
----------------------
Lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
- [BL] Shell Collection bmore.sh - wrapper for /bin/more, Lee Forrest, 02/12/2007
Archive powered by MHonArc 2.6.24.