[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script command question



On Mon, Aug 30, 1999 at 09:17:38PM -0700, Mark Wagnon wrote:
> I'm taking a C class this semester and my instructer want us to use
> the script command to verify our work: cat the program, compile it,
> and enter test data while scripting.
> 
> The program itself is easy to use, but I get control codes embedded
> in the file. Things like ^G, ^H, and ^M. Has anyone used this
> program (I didn't even know it existed until today), and experienced
> the insertion of control characters or know how to prevent it? If
> not, no big deal. It'll be an excuse to delve into writing a shell
> script to strip them out :)

Another possibliity:  are you using anything which will produce fun
text properties, such as colors, underline or bold?

I use ls with color and also use a cool prompt setting in bash (see
below) which does REALLY nasty things to script.  If you find a clever
way to keep the colors and fix the script output, I'd be happy to hear
it!

					-Michael
------------------------------------------------------------------------
# here's the relevant part of my .bashrc

case $TERM in
  xterm*)
    PS1="\[\033]0;\w\007\]\\033[1;31m\h\033[0m$ "
    ;;
  *)
    PS1="\h$ "
    ;;
esac

-- 
  Michael Stenner			Office Phone: 919-660-2513
  Duke University, Dept. of Physics	  mstenner@phy.duke.edu
  Box 90305, Durham N.C. 27708-0305


Reply to: