Xref: utzoo comp.sources.wanted:5614 comp.sources.d:2981 Path: utzoo!attcan!uunet!vsedev!logan From: logan@vsedev.VSE.COM (James Logan III) Newsgroups: comp.sources.wanted,comp.sources.d Subject: Re: using curses from a script? Message-ID: <1247@vsedev.VSE.COM> Date: 22 Nov 88 18:38:34 GMT References: <7668@well.UUCP> Reply-To: logan@vsedev.VSE.COM (James Logan III) Organization: VSE Software Development Lab Lines: 33 In article <7668@well.UUCP> Jef Poskanzer writes: >Has anyone written a tool to perform curses functions from a shell script? >Something like "curse so" to enter stand-out mode, or "curse cm 14 3" to >do cursor addressing. If no one can point me to something like this, I'll >hack it up and post it. Have you ever heard of tput(1) under System V? It almost does what you want with the exception that you can't give it screen addressing arguments. Instead you can say "tput cup" and it will give you something like: ^[[%i%p1%d;%p2%dH that you can parse pretty easily. It will let you do this kind of thing in a shell script: CLEAR=`tput clear`; BOLD=`tput bold`; NORM=`tput sgr0`; . . . echo "${CLEAR}This is an ${BOLD}IMPORTANT${NORM} message!"; -Jim -- Jim Logan logan@vsedev.vse.com (703) 892-0002 uucp: ..!uunet!vsedev!logan inet: logan%vsedev.vse.com@uunet.uu.net