Hi all,
I have many files that have 1 or more occurrences of the information I want. There are two distinct sets of information. I want get this info and place each occurrence in its own file.
The 3 lines before one set are
this grid
00 01 02
16 17 18
**40 lines of code I want to... (5 Replies)
Hi all,
I need to extract lines between the lines 'RD' and 'QA' from a text file (following). there are more that one of such pattern in the file and I need to extract all of them. however, the number of lines between them is varied in the file. Therefore, I can not just use 'grep -A' command.... (6 Replies)
input file
Desired csv output
gc_type, date/time, milli secs
af, Mar 17 13:09:04 2011, 144.596
af, Mar 20 00:37:37 2011, 144.242
af, ar 20 21:30:59 2011, 108.518
Hi All,
Any help in acheiving the above would be appreciated. I would like to parse through lines within one file and... (5 Replies)
Hi all,
Please go through my requirement.
I have a log file in the location /opt/WebSphere61/AppServer/profiles/EMQbatchprofile/logs/EMQbatch
This file contains the follwing pattern data
<af type="tenured" id="42" timestamp="May 14 13:44:13 2011" intervalms="955.624">
<minimum... (8 Replies)
I have a text file with a list of items/patterns:
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig12238
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig34624... (1 Reply)
I have hundreds of files to process. In each file
I need to look for a pattern then
extract value(s) from next line and then
search for value(s) selected from point (2) in the same file at a specific position.
HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V
TITLE CYTOCHROME... (7 Replies)
Hi all,
I got a file that contains the following content, Actually it is a part of the file content,
Installing XYZ XYZA Image, API 18, revision 2
Unzipping XYZ XYZA Image, API 18, revision 2 (1%)
Unzipping XYZ XYZA Image, API 18, revision 2 (96%)
Unzipping XYZ XYZA Image, API 18,... (7 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
GM,
I have an issue at work, which requires a simple solution. But, after multiple attempts, I have not been able to hit on the code needed.
I am assuming that sed, awk or even perl could do what I need.
I have an application that adds extra blank page feeds, for multiple reports, when... (7 Replies)
Discussion started by: jxfish2
7 Replies
LEARN ABOUT BSD
lex
LEX(1) General Commands Manual LEX(1)NAME
lex - generator of lexical analysis programs
SYNOPSIS
lex [ -tvfn ] [ file ] ...
DESCRIPTION
Lex generates programs to be used in simple lexical analyis of text. The input files (standard input default) contain regular expressions
to be searched for, and actions written in C to be executed when expressions are found.
A C source program, 'lex.yy.c' is generated, to be compiled thus:
cc lex.yy.c -ll
This program, when run, copies unrecognized portions of the input to the output, and executes the associated C action for each regular
expression that is recognized.
The options have the following meanings.
-t Place the result on the standard output instead of in file "lex.yy.c".
-v Print a one-line summary of statistics of the generated analyzer.
-n Opposite of -v; -n is default.
-f "Faster" compilation: don't bother to pack the resulting tables; limited to small programs.
EXAMPLE
lex lexcommands
would draw lex instructions from the file lexcommands, and place the output in lex.yy.c
%%
[A-Z] putchar(yytext[0]+'a'-'A');
[ ]+$ ;
[ ]+ putchar(' ');
is an example of a lex program that would be put into a lex command file. This program converts upper case to lower, removes blanks at the
end of lines, and replaces multiple blanks by single blanks.
SEE ALSO yacc(1), sed(1)
M. E. Lesk and E. Schmidt, LEX - Lexical Analyzer Generator
7th Edition April 14, 1986 LEX(1)