UNIX help to print 50 lines after every 3rd occurrence pattern till end of file
I need help with extract/print lines till stop pattern. This needs to happen after every 3rd occurrence of start pattern and continue till end of file. Consider below is an example of the log file. my start pattern will be every 3rd occurrence of ERROR_FILE_NOT_FOUND and stop pattern will be Stop_pattern
desired output: ---------- Post updated at 02:21 PM ---------- Previous update was at 02:11 PM ----------
ignore the input/output provided in last thread here's correct one however problem statement remains same
desired output:
Last edited by Franklin52; 10-01-2014 at 04:53 PM..
Reason: Please use code tags
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (2 Replies)
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (1 Reply)
Dear All
I have a file like this
112534554
446538656
444695656
225696966
226569744
228787874
113536566
443533535
222564552
115464656
225445345
225533234
I want to cut the file into different parts where the first two columns are '11' . The first two columns will be either... (3 Replies)
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Hi,
I have a file as below
select or create proc
/*comments*/
/*comments*/
/*comments*/
/*comments*/
( variables4 datatypes1,
variables1 datatypes2,
variables2 datatypes3,
variables3 datatypes2
)
some text some text
(
sometext some text
)
some text some text (3 Replies)
Hi, i have file f1.txt with data like:
CHECK
a
b
CHECK
c
d
CHECK
e
f
JOB_START
....
I want to match the last occurrence of 'CHECK' until the end of the file.
I can use awk:
awk '/^CHECK/ { buf = "" } { buf = buf "\n" $0 } END { print buf }' f1.txt | tail +2Is there a cleaner way of... (2 Replies)
I have a file which is like this
………………………………………..
…………………………………
…………………………………
……………………………………
…………………………………….
………………………………
<<<from_here>>>
………………………………
……………………………….
I want a script which would fetch the data starting from <<<from_here>>> in the file till the end... (2 Replies)
Hello Friends,
Hope all are doing fine.
Here is a tricky issue.
my input file is like this
07 10 14 20 21
03 15 27 30 32
01 10 11 19 30
02 06 14 15 17
01 06 20 25 29
Logic:
1. Please print another column as "0-0-0-0-0" for the first and second rows.
2. Read the first column... (4 Replies)
Hi, i have file file.txt with data like:
START
03:11:30 a
03:11:40 b
END
START
03:13:30 eee
03:13:35 fff
END
jjjjjjjjjjjjjjjjjjjjj
START
03:14:30 eee
03:15:30 fff
END
ggggggggggg
iiiiiiiiiiiiiiiiiiiiiiiii
I want the below output
START (13 Replies)
Discussion started by: Jyotshna
13 Replies
LEARN ABOUT DEBIAN
ndselect
NDSELECT(1) User Commands NDSELECT(1)NAME
ndselect - select lines and fields for numdiff
DESCRIPTION
Usage: ndselect -h|--help|-v|--version or
ndselect [-b N][-e N][-s N][-F N][-L N][-I N][-S IFS][-x][-l PATH][-o PATH] [FILE]
Print to standard output a subset of lines and fields from a given file.
The argument after the options is the name of the file to read from. The complete path of the file should be given, a directory name is
not accepted. If no input file is specified, the program reads from the standard input.
Exit status: 0 in case of normal termination, -1 (255) in case of error
-b, --beginning, --start=N
Set to N the number of the first line to print (The default behavior is to start with line number 1)
-e, --end=N
Set to N the number of the last line that can be printed (The default behavior is to arrive till to the end of the file)
-s, --step=N
Set to N the increment to use when selecting the lines to print (The default value for the increment is 1)
-F, --first-field=N
Set to N the number of the first field to print (The default behavior is to start with field number 1)
-L, --last-field=N
Set to N the number of the last field that can be printed (The default behavior is to arrive till to the end of every line)
-I, --increment=N
Set to N the increment to use when selecting the fields to print (The default value for the increment is 1)
-S, --separator=IFS
Specify the set of characters to use to split the input lines into fields (The default set of characters is space, tab and newline).
-x, --omit-empty-lines
Do not print empty lines
-l, --warnings-to=PATH
Redirect warning and error messages from stderr to the indicated file
-o, --output=PATH
Redirect output from stdout to the indicated file
-h, --help
Show this help message
-v, --version
Show version number, Copyright, Distribution Terms and NO-Warranty
COPYRIGHT
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Ivano Primi <ivprimi@libero.it>
License GPLv3+: GNU GPL version 3 or later, see <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for ndselect is maintained as a Texinfo manual. If the info and ndselect programs are properly installed at your
site, the command
info numdiff
should give you access to the complete manual.
ndselect 5.6.0 January 2012 NDSELECT(1)