Sponsored Content
Top Forums Shell Programming and Scripting Print pattern range to a new file Post 302534383 by verge on Monday 27th of June 2011 06:52:46 PM
Old 06-27-2011
Print pattern range to a new file

Hi Everyone!

I really appreciate all of your help, I'm learning so much, can't wait until I get good enough to start answering questions!

I have a problem ... from one large file, I'd like to create multiple new files for each pattern block

beginning with /^ISA/
ending with /^IEA/

I'd even be happy with creating a new file for everything up to and including each occurence of ISA.

File is too big for csplit, I get a virtual memory exhausted error ... so I was thinking perl or awk? But I'm too new to both.

Again, I really appreciate your taking the time to help and answer questions
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to print file names in a certain date range using ls

I need to list only file names of a specific date from the command ls -lt. :confused: (2 Replies)
Discussion started by: Shamwari
2 Replies

2. Shell Programming and Scripting

print range between two patterns if it contains a pattern within the range

I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated. e.g. Pattern1 Bombay Calcutta Delhi Pattern2 Pattern1 Patna Madras Gwalior Delhi Pattern2 Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies

3. Shell Programming and Scripting

How to print range of lines using sed when pattern has special character "["

Hi, My input has much more lines, but few of them are below pin(IDF) { direction : input; drc_pinsigtype : signal; pin(SELDIV6) { direction : input; drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies

4. Shell Programming and Scripting

Print Range Only Once Per File

Scenario: Each of several .txt files contain the following (but perhaps with some minor variations due to code version running on the devices from which the text was extracted): <output omitted> SWITCH1#show proc cpu hist 1... (4 Replies)
Discussion started by: svermill
4 Replies

5. Shell Programming and Scripting

print range of lines matching pattern and previous line

Hi all, on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern. the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/' I need to include the... (1 Reply)
Discussion started by: siriche
1 Replies

6. Shell Programming and Scripting

Sed print range of lines between line number and pattern

Hi, I have a file as below This is the line one This is the line two <\XMLTAG> This is the line three This is the line four <\XMLTAG> Output of the SED command need to be as below. This is the line one This is the line two <\XMLTAG> Please do the need to needful to... (4 Replies)
Discussion started by: RMN
4 Replies

7. Shell Programming and Scripting

sed command to print first instance of pattern in range

The following text is in testFile.txt: one 5 two 10 three 15 four 20 five 25 six 10 seven 35 eight 10 nine 45 ten 50 I'd like to use sed to print the first occurance of search pattern /10/ in a given range. This command is to be run against large log files, so to optimize efficiency,... (9 Replies)
Discussion started by: uschaafm
9 Replies

8. Shell Programming and Scripting

Extract range from config file matching pattern

I have config file like this: server_name xx opt1 opt2 opt3 suboptions1 #suboptions - disabled suboptions2 pattern suboptions3 server_name yy opt1 opt2 opt3 suboptions1 pattern #suboptions - disabled suboptions2 So basically I want to extract the server... (1 Reply)
Discussion started by: nemesis911
1 Replies

9. Shell Programming and Scripting

awk to print out lines that do not fall between range in file

In the awk below I am trying to print out those lines in file2 that are no between $2 and $3 in file1. Both files are tab-delimeted and I think it's close but currently it is printeing out the matches. The --- are not part of the files they are just to show what lines match or fall into the range... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

How to quickly substitute pattern within certain range of a huge file?

I have big files (some are >300GB!) that need substitution for some patterns, for example, change Multiple Spaces into Tab. I used this oneliner:sed '1,18s/ \{1,\}/\t/g' infile_big.sam > outfile_big.sambut it seems very slow as the job is still running after 24 hours! In this example, only the... (8 Replies)
Discussion started by: yifangt
8 Replies
PNP(4)							 BSD/i386 Kernel Interfaces Manual						    PNP(4)

NAME
pnp -- support for ``Plug and Play'' (PnP) ISA devices DESCRIPTION
The pnp driver enumerates ISA devices which support ``Plug and Play ISA Specification'' in the system. It assigns ISA bus resources (inter- rupt line, DMA channel, I/O ports, and memory region) to each device and activates it. If it cannot assign necessary resources to a PnP ISA device without causing conflict with other devices in the system, the device will not be activated and will be unavailable to programs. CAVEATS
It is not possible to disable individual PnP ISA devices. The pnp driver will find all devices conforming the PnP ISA specification and try to activate them all. There is no way to explicitly assign particular resource to the PnP ISA device. The resource assignment is fully automatic and there is no provision for manual override. SEE ALSO
pnpbios(4) STANDARDS
Intel and Microsoft, Plug and Play ISA Specification, Version 1.0a, May 5, 1994. Clarifications to the Plug and Play ISA Specification, Version 1.0a, December 10, 1994. HISTORY
The pnp driver first appeared in FreeBSD 2.2.5. It has been substantially updated in subsequent versions. AUTHORS
PnP support was originally written for FreeBSD 2.2.5 by Luigi Rizzo, based on initial work done by Sujal Patel. BSD
September 20, 2001 BSD
All times are GMT -4. The time now is 10:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy