expect question

john heasley heas at shrubbery.net
Wed Jul 23 18:51:46 UTC 2003


Wed, Jul 23, 2003 at 09:32:32PM +1000, Andrew Fort:
> A question for the expect clueful lurking..
> 
> Can one perform a regsub on the data returning from the telnet/ssh/etc 
> session? 
> I'd like to escape out an RE of terminal control characters that are 
> intermingled in the stream before being passed to the expect clause.
> 

i do not know of any way to do this.  ultimately,

	expect_before {
		"esc-match"	{ rewrite_w/o
				  push back
				  exp_continue
				}
	}

afaik, your only option is to match the curses junk, strip it, and continue.

when working on hrancid, i could not get this to work properly.  i bagged
it and hence hpfilter.



More information about the Rancid-discuss mailing list