Sponsored Content
Top Forums Shell Programming and Scripting Delete lines falling in a range Post 302833073 by swasid on Tuesday 16th of July 2013 07:08:13 AM
Old 07-16-2013
No I want the entire line which contains the pattern 05000 to be deleted or put into a separate file. Also, these lines are not continuous meaning the lines containing 05000 upto 05999 are interspersed like in the below

Code:
0136812368126     03000   Statement
1237129372189     02321   JIT
0136812368126     05000   terminal
1237129372189     02999   Utilise
0136812368126     03000   Statement
1237129372189     05001   JIT
0136812368126     04253   terminal
1237129372189     05002   Utilise

All these lines containing the pattern from 05000 to 05999 should be separated out from the file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep a string in a range and delete the line

Hi, i need to delete a lines after searching a particular string but this searching should only happen after the 4th line.. basically imagine a file like this From: abcd.yahoo.com To: cdeb.yahoo.com Subject: hi all sdfsd sadasd asdasd dfsdf From: abcd.yahoo.com To:... (3 Replies)
Discussion started by: depakjan
3 Replies

2. Shell Programming and Scripting

delete rows between closest pattern or range

Hi I am having some problom deleting the lines between two specific lines in a file. need to delete lines between two closest lines. i.e need to find the closest range or pattern in a file with repeating patterns. Sample Input: WARNING <some text in n number of lines> ERROR:2597... (10 Replies)
Discussion started by: sudheer1984
10 Replies

3. Shell Programming and Scripting

Selecting a range of Lines

Hi All, Is there a way to get a range of lines from a file??? I want to search through a set of scripts and need to select the group of lines which do the FTP. Say, Line1 Line2 ftp SERVER user UNAME PASS send FILE_TO_BE_SENT close Line3 Line4 Line5 ftp SERVER1 user USER1 PASS1... (6 Replies)
Discussion started by: beinthemiddle
6 Replies

4. UNIX for Dummies Questions & Answers

Date range command (and delete)

Hello. Newbie here.... I basically have a directory with tens of thousands (literally) subdirectories and need to delete those that are older than 2008 (hundreds) with all their contents. I've looked through all the RM parameters and still can't quite figure out how to specify the data range... (7 Replies)
Discussion started by: pqmomba8
7 Replies

5. Shell Programming and Scripting

sed delete range

Hi I would like to delete ranges of text from an html file; In the sentence; aqua>Stroomprobleem in Hengelo verholpen <a href="107-01.html"><font color=yellow>107</a> With several sentences like this in that file, where the text between <a href a> varies, so it needs to be deleted in the... (2 Replies)
Discussion started by: mdop
2 Replies

6. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

7. Shell Programming and Scripting

Count occurences of a numeric string falling in a range

Dear all, I have numerous dat files (1.dat, 2.dat...) containing 500 numeric values each. I would like to count them, based on their range and obtain a histogram or a counter. INPUT: 1.dat 1.3 2.16 0.34 ...... 2.dat 1.54 0.94 3.13 ..... ... (3 Replies)
Discussion started by: chen.xiao.po
3 Replies

8. UNIX for Dummies Questions & Answers

How to display lines by range specified?

My input file is N3*123 ABC FLATS~ REF*D9*10000000001~ N3*223 ABC FLATS~ REF*D9*10000000002~ N3*323 ABC FLATS~ REF*D9*10000000003~ N3*423 ABC FLATS~ REF*D9*10000000004~ N3*523 ABC FLATS~ REF*D9*10000000005~ N3*623 ABC FLATS~ REF*D9*10000000006~ N3*723 ABC FLATS~ REF*D9*10000000007~ N3*823... (2 Replies)
Discussion started by: nsuresh316
2 Replies

9. UNIX for Beginners Questions & Answers

How to delete row in csv file on date range?

I want to delete row in csv file , which row value from 2009-10-01 to 2011-06-03 using script.my csv row data look like: 2009-10-01 2011-03-30 2011-03-31 2011-04-01 2011-06-03 2011-06-30 2011-07-01 2011-09-28 ... (7 Replies)
Discussion started by: rakibul639
7 Replies

10. UNIX for Beginners Questions & Answers

Sed/awk to delete a regex between range of lines

Hi Guys I am looking for a solution to one problem to remove parentheses in a range of lines. Input file module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk ); input a; input ab; input dhd; input djdj; input dhd; output hdh; output djjd; output jdj;... (5 Replies)
Discussion started by: kshitij
5 Replies
PCRE_ASSIGN_JIT_STACK(3)				     Library Functions Manual					  PCRE_ASSIGN_JIT_STACK(3)

NAME
PCRE - Perl-compatible regular expressions SYNOPSIS
#include <pcre.h> void pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *data); void pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *data); void pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void *data); DESCRIPTION
This function provides control over the memory used as a stack at run-time by a call to pcre[16|32]_exec() with a pattern that has been successfully compiled with JIT optimization. The arguments are: extra the data pointer returned by pcre[16|32]_study() callback a callback function data a JIT stack or a value to be passed to the callback function If callback is NULL and data is NULL, an internal 32K block on the machine stack is used. If callback is NULL and data is not NULL, data must be a valid JIT stack, the result of calling pcre[16|32]_jit_stack_alloc(). If callback not NULL, it is called with data as an argument at the start of matching, in order to set up a JIT stack. If the result is NULL, the internal 32K stack is used; otherwise the return value must be a valid JIT stack, the result of calling pcre[16|32]_jit_stack_alloc(). You may safely assign the same JIT stack to multiple patterns, as long as they are all matched in the same thread. In a multithread appli- cation, each thread must use its own JIT stack. For more details, see the pcrejit page. There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page. PCRE 8.30 24 June 2012 PCRE_ASSIGN_JIT_STACK(3)
All times are GMT -4. The time now is 04:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy