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 ?


Relevant Pages

  • TIP #185: Null Handling
    ... nulls, and command modifications for manipulating them. ... Tcl deals with strings, the universal medium for representing data. ... is know and it is an empty string, but if a respondent forgets to give ...
  • Re: Determine how Word was launched
    ... inspect the command line used to launch Word. ... Private Declare Function GetCommandLineA Lib "kernel32" As Long ... Public Function GetCommandLineAs String ... Dim lngCmdLinePtr As Long ...
  • Re: Class.getMethod in classs static initializer block
    ... I just wanted to add that I had some similar code for a "command line server" project. ... static private final boolean DEBUG = true; ... {public ReturnCode runCommand(String s) ... public ReturnCode parseLine(String line) ...
  • Re: New "base document" available
    ... How to go about retrieving command line parameters? ... the command line arguments (and environment variables) ... Keyword and positional parameters can be mixed in the same command line. ... clp-name points to a string containing "P1" ...
  • Re: How about UserRPL command to store "bare" text to SD?
    ... just as with Kermit transfers. ... a string directly to the SD card, verbatim, ... whose function is simply "store this literal string to that file" ... a more basic and universal "store this literal string as a file" command. ...