Re: Need help with expect

On Thu, 20 Jan 2011 18:23:48 -0800, contracer wrote:
How could I remove all data between the "10H" string ?
10H'.............. 6920-IFF/FB 20/01/1122M10H
I need a command , not vi.
These file haves a lot of these data, in a long line.

If by 'between the "10H" string' you mean from FOLLOWUP through
to 1122M, sed or awk will work; eg if the data is in file ff,
and if the 10H are at beginning and end of line, then
sed 's/^10H.*10H$/10H10H/' ff
would change each line like the above to 10H10H .
Is that what you want? It doesn't seem useful.

It wasn't clear to me (from your earlier message that said
"When I try open this file with vi, I get: x7.lis Line too long")
what file you were referring to. Presumably not the text in
as it doesn't seem to have 'FOLLOWUP(SCRITORY)' in it.

If you mean a transcript with embedded control sequences, as you
mentioned before, Icarus Sparry explained earlier what to do, and
he also wrote "it depends on what tools you have". You seem to be
posting from an MS Windows system which some unix shell tools
installed, but rather than me speculating perhaps you could just
say what kind of system your files are on, and what tools are
available. Eg, do you have ed, sed, perl, awk, grep, cut, file,
tr, sh, bash, ksh, etc etc ?

How did the control sequences get into your files? Are the
sequences like ANSI/VT100 screen controls as discussed before?
Are the files tar files or database files? If ff is one of
the files, what is the result of the command file ff ?