Xref: utzoo comp.unix.xenix:7037 comp.unix.wizards:17593 Path: utzoo!attcan!utgpu!watmath!att!tut.cis.ohio-state.edu!mailrus!wasatch!cs.utexas.edu!usc!elroy.jpl.nasa.gov!zardoz!conexch!root From: root@conexch.UUCP (Larry Dighera) Newsgroups: comp.unix.xenix,comp.unix.i386,comp.unix.wizards Subject: A Beter ScreenDump for ANSI terminals Keywords: ANSI screen-dump Message-ID: <35087@conexch.UUCP> Date: 10 Aug 89 02:38:44 GMT Reply-To: root@conexch.UUCP (Larry Dighera) Organization: The Consultants' Exchange, Orange County, CA. (714) 842-6348 Lines: 43 Here's an improved version of the screen saving routine found on the SCO SOS BBS and originally posted by Bob Willey: :---------------------------------------------------------------------------- # ANSI screen dump # # Complements of: # Dighera Data Services Mon Aug 7 13:35:03 PDT 1989 DMP_FIL="screen.out" # file to contain the output DMP_DIR="./" # could be $HOME/ or /usr/tmp/ export DMP_FIL DMP_DIR # getopt count="1" for i do count="`expr $count + 1`" case $i in -f) DMP_FIL=`eval "(echo $"$count")"` ;; -\?)echo "Usage: $0 [-f dumpfile]" 1>&2; exit 1;; *) ;; esac done # doit savtty="`stty -g`" stty -echo ixon ixoff -ixany echo '\033[2i' head -24 | sed 's/ $//' >> "$DMP_DIR$DMP_FIL" # 80 characters per line # One could add other options for the below forms of output #head -24 >> "$DMP_DIR$DMP_FIL" # 81 characters per line #head -24 | tr -d '\012'>> "$DMP_DIR$DMP_FIL" # one line of 1920 characters stty "$savtty" :---------------------------------------------------------------------------- -- USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA 92712 TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71) UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp UUCP: ...!uunet!spsd!conexch!root || ...!ccicpg!conexch!root