Sponsored Content
Top Forums Shell Programming and Scripting counting the lines matching a pattern, in between two pattern, and generate a tab Post 302299217 by d.chauliac on Thursday 19th of March 2009 01:30:31 PM
Old 03-19-2009
I made it work. Thank you very much it is doing exactly what I want.

D.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pattern matching over more lines

hi, i have a text file wich contains following informations: 1 Record 90 in base GUJA_2008 (Created: 2008-01-14 19:00:38, Modified: 2008-01-15 18:54:33) 1 YADM_20080101_A91645666_A91645666 4 2008/01/15/ADM.ADM/20080101.ADM.ADM.A91645666G001.jff 1 Record 91 in base GUJA_2008 (Created:... (3 Replies)
Discussion started by: trek
3 Replies

2. Shell Programming and Scripting

Pattern Matching and lines after that

I have a huge file and every paragraph has a date. But I want to retrieve the paras for the last two days only. So I can grep and findout the linenum for the first line since yesterday. Now I want to display everything after that line. And I am trying to do this inside a script so the linenum is a... (4 Replies)
Discussion started by: kaushys
4 Replies

3. Shell Programming and Scripting

pattern matching lines using the date, and then joining the lines

Hi Guys, Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated. Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n" TIME SERVER/CLIENT TEXT... (6 Replies)
Discussion started by: eo29
6 Replies

4. Shell Programming and Scripting

Finding lines matching the Pattern and their previous lines in a file

Hi, I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using: grep -w 'Possible network disconnect' file_name. But I am more interested in getting the timing of these events which are... (7 Replies)
Discussion started by: sagarparadkar
7 Replies

5. Shell Programming and Scripting

counting lines that match pattern

I have a file of 1.3 millions lines. some are with the same word twice on the line, some line have two diffrent words. each line has two words, one in brackets. example: foo (foo) bar (bar) thae (awvd) beladf (vswvw) I am sure this can be done with one line of... (6 Replies)
Discussion started by: robsonde
6 Replies

6. Shell Programming and Scripting

Pattern matching...of almost same lines

Hi all I am trying to process some data sample input is like this VARIABLE : T axis TDAY TIME : 02-FEB-2004 17:54 19755. VARIABLE : quality flag FILENAME : 1900054_prof.nc Z : 41 ... (3 Replies)
Discussion started by: Akshay Hegde
3 Replies

7. Shell Programming and Scripting

Sed: printing lines AFTER pattern matching EXCLUDING the line containing the pattern

'Hi I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match. Which option is to be used to exclude the line containing the pattern? sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies

8. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

10. Shell Programming and Scripting

Print lines after matching two pattern

would like to print everything after matching two patterns AAA and BBB. output : CCC ZZZ sample data : AAA BBB CCC ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
Finding Objects Inside a CPU set(3)			     Hardware Locality (hwloc)			       Finding Objects Inside a CPU set(3)

NAME
Finding Objects Inside a CPU set - Functions static inline hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set) int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *restrict objs, int max) static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, unsigned idx) static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx) static inline unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth) static inline int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type) static inline int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology , hwloc_const_cpuset_t set, hwloc_obj_t obj) Function Documentation static inline hwloc_obj_t hwloc_get_first_largest_obj_inside_cpuset (hwloc_topology_ttopology, hwloc_const_cpuset_tset) [static] Get the first largest object included in the given cpuset set. Returns: the first object that is included in set and whose parent is not. This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set. Note: This function cannot work if the root object does not have a CPU set, e.g. if the topology is made of different machines. int hwloc_get_largest_objs_inside_cpuset (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_t *restrictobjs, intmax) Get the set of largest objects covering exactly a given cpuset set. Returns: the number of objects returned in objs. Note: This function cannot work if the root object does not have a CPU set, e.g. if the topology is made of different machines. static inline unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth) [static] Return the number of objects at depth depth included in CPU set set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline int hwloc_get_nbobjs_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype) [static] Return the number of objects of type type included in CPU set set. If no object for that type exists inside CPU set set, 0 is returned. If there are several levels with objects of that type inside CPU set set, -1 is returned. Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth, hwloc_obj_tprev) [static] Return the next object at depth depth included in CPU set set. If prev is NULL, return the first object at depth depth included in set. The next invokation should pass the previous return value in prev so as to obtain the next object in set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_next_obj_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype, hwloc_obj_tprev) [static] Return the next object of type type included in CPU set set. If there are multiple or no depth for given type, return NULL and let the caller fallback to hwloc_get_next_obj_inside_cpuset_by_depth(). Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. static inline int hwloc_get_obj_index_inside_cpuset (hwloc_topology_t topology, hwloc_const_cpuset_tset, hwloc_obj_tobj) [static] Return the logical index among the objects included in CPU set set. Consult all objects in the same level as obj and inside CPU set set in the logical order, and return the index of obj within them. If set covers the entire topology, this is the logical index of obj. Otherwise, this is similar to a logical index within the part of the topology defined by CPU set set. static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_depth (hwloc_topology_ttopology, hwloc_const_cpuset_tset, unsigneddepth, unsignedidx) [static] Return the (logically) idx -th object at depth depth included in CPU set set. Note: This function cannot work if objects at the given depth do not have CPU sets or if the topology is made of different machines. static inline hwloc_obj_t hwloc_get_obj_inside_cpuset_by_type (hwloc_topology_ttopology, hwloc_const_cpuset_tset, hwloc_obj_type_ttype, unsignedidx) [static] Return the idx -th object of type type included in CPU set set. If there are multiple or no depth for given type, return NULL and let the caller fallback to hwloc_get_obj_inside_cpuset_by_depth(). Note: This function cannot work if objects of the given type do not have CPU sets or if the topology is made of different machines. Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.4.1 Mon Feb 27 2012 Finding Objects Inside a CPU set(3)
All times are GMT -4. The time now is 05:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy