Sponsored Content
Top Forums Shell Programming and Scripting Extracting text out of specific lines Post 302307869 by krabu on Thursday 16th of April 2009 01:36:22 PM
Old 04-16-2009
Extracting text out of specific lines

Hi,
I have a file like

LAHORE 2009-04-16 16:04:19 THU
S5830 FAULT MESSAGE SUPPRESS STATUS
LOC : ASP00
STS : SUPPRESSING CONTINUE
INF : F6201 TRUNK. DATA FAULT REPORT
COMPLETED

LAHORE 2009-04-16 16:04:20 THU
S8400 ISUP SIGNALLING TRACE - NORMAL
ITEM TYPE ASP TRK RTE CALL OPC DPC CIC (PCM/CH)
RTE ALL 007 1980 0600 ICT NAT/H'105f NAT/H'10a4 0604(018/28)
CG_PARTY_NO CD_PARTY_NO ISUP_VERSION
428530559 0427376505F WHITE
---- --- ----------------------------------------------- --------------
MSG DIR DATA TIME
---- --- ----------------------------------------------- --------------
IAM <-- 00 20 01 0a 00 02 0a 08 83 10 40 72 73 56 50 0f [16:04:18.200]
08 01 00 0a 07 83 13 24 58 03 55 09 3d 01 1f 00
REL --> 02 04 02 82 91 1e 02 02 08 00 [16:04:18.920]
RLC <-- 00 [16:04:19.200]
---- --- ----------------------------------------------- --------------
REL_REASON = USER BUSY
COMPLETED

LAHORE 2009-04-16 16:04:20 THU
S8400 ISUP SIGNALLING TRACE - NORMAL
ITEM TYPE ASP TRK RTE CALL OPC DPC CIC (PCM/CH)
RTE ALL 007 2366 0600 ICT NAT/H'105f NAT/H'10a4 0958(029/30)
CG_PARTY_NO CD_PARTY_NO ISUP_VERSION
428711416 0422009120F WHITE
---- --- ----------------------------------------------- --------------
MSG DIR DATA TIME
---- --- ----------------------------------------------- --------------
IAM <-- 00 20 01 0a 00 02 0a 08 81 10 40 22 00 19 02 0f [16:04:17.800]
08 01 00 0a 07 83 13 24 78 11 14 06 3d 01 1f 00
ACM --> 12 14 01 2e 01 00 39 02 2e c0 00 [16:04:18.120]
REL --> 02 00 03 81 81 00 [16:04:19.040]
RLC <-- 00 [16:04:19.400]
---- --- ----------------------------------------------- --------------
REL_REASON = UNALLOC NUMBER
COMPLETED


I want to extract highlighted text and have output like

RTE Call CIC CG_PARTY_NO CD_PARTY_NO Release
600 ICT 0604(018/28) 428530559 0427376505F USER BUSY600 ICT 0958(029/30) 428711416 0422009120F UNALLOC NUMBER

Please help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting specific text from a file

Dear All, I have to extract a a few lines from a log file and I know the starting String and end string(WHich is same ). Is there any simplere way using sed - awk. e.g. from the following file -------------------------------------- Some text Date: 21 Oct 2008 Text to be extracted... (8 Replies)
Discussion started by: rahulkav
8 Replies

2. Shell Programming and Scripting

Extracting specific characters from a text file

I'm extremely new to scripting and linux in general, so please bear with me. The class I'm taking gives virtually no instruction at all, and so I'm trying to learn everything off the web. Anyway, I'm trying to extract characters that follow after a specific pattern ( '<B><FONT FACE="Arial">' ) but... (3 Replies)
Discussion started by: livos23
3 Replies

3. Shell Programming and Scripting

Extracting Text Between Two Unique Lines

Hi all! Im trying to extract a portion of text from a file and put it into a new file. I need all the lines between <Placement> and </Placement> including the Placemark lines themselves. Is there a way to extract all instances of these and not just the first one found? I've tried using sed and... (4 Replies)
Discussion started by: Grizzly
4 Replies

4. Shell Programming and Scripting

extracting specific lines from a file

hi all, i searched in unix.com and accquired the following commands for extracting specific lines from a file .. sed -n '16482,16482p' in.sql > out.sql awk 'NR>=10&&NR<=20' in.sql > out.sql.... these commands are working fine if i give the line numbers as such .. but if i pass a... (2 Replies)
Discussion started by: sais
2 Replies

5. Shell Programming and Scripting

extracting specific text from lines

Hello, i've got this output text: and i need it to look something like this: which means that there won't be absolute path of each directory, just it's size and the last word after last '/' in each line, and i also don't need last line '1.7M /tmp' Looks like there is a simple... (5 Replies)
Discussion started by: krater559
5 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

Extracting Tag along with specific lines

I have this input file: and the desired output is as follows: Desired Output This is a sample taken from a huge file. Basically, the script should take the tag (TDK11..1>) add everything that has bukle=A until it sees the blank lines. Then takes the next tag (TDK2222>) adds everything that... (4 Replies)
Discussion started by: Ernst
4 Replies

8. UNIX for Dummies Questions & Answers

Filtering data -extracting specific lines

I have a table to data which one of the columns include string of text from within that, I am searching to include few lines but not others for example I want to to include some combination of word address such as (address.| address? |the address | your address) but not (ip address | email... (17 Replies)
Discussion started by: A-V
17 Replies

9. UNIX for Advanced & Expert Users

Extracting specific lines from data file

Hello, Is there a quick awk one-liner for this extraction?: file1 49389 text55 52211 text66 file2 59302 text1 49389 text2 85939 text3 52211 text4 13948 text5 Desired output 49389 text2 52211 text4 Thanks!! (5 Replies)
Discussion started by: palex
5 Replies

10. UNIX for Dummies Questions & Answers

Extracting data between specific lines, multiple times

I need help extracting specific lines in a text file. The file looks like this: POSITION TOTAL-FORCE (eV/Angst) ----------------------------------------------------------------------------------- 1.86126 1.86973 1.86972 ... (14 Replies)
Discussion started by: captainalright
14 Replies
__pset_rtctl(2) 						System Calls Manual						   __pset_rtctl(2)

NAME
__pset_rtctl() - real-time processor set control SYNOPSIS
DESCRIPTION
HP-UX Processor Sets allow a subset of processors in the system to be isolated for exclusive use by specified threads and processes. Only the threads bound to a processor set can execute on processors in that processor set (see pset_create(2)). The function extends processor set functionality for real-time applications to minimize operating system activities in a processor set. A processor set can be configured as a real-time processor set (referred to as RTE processor set). An RTE processor set has the following special features that are not available in standard processor sets: The scheduler does not schedule kernel daemons on processors in the RTE processor set. Kernel daemons are restricted to processors in non-RTE processor sets. External I/O interrupts on processors in the RTE processor set are disabled. The system is reconfigured to not deliver any external I/O interrupts to processors in the RTE processor set. (The clock interrupt still continues to come on each processor though). This feature may not be supported on all platforms (see intctl(1M) for details). All pending callouts on processors in the RTE processor set are reassigned to processors in non-RTE processor sets. However, if a real-time application in an RTE processor set requests a service which requires callout support in the kernel, such callouts may execute on RTE processors. The system always has at least one non-RTE processor set. The system default processor set (see pset_create(2)) cannot be configured as an RTE processor set. Since the system default processor set is never empty, there is always at least one processor in a non-RTE processor set to execute the kernel daemons, I/O interrupts and callouts for the system. The request argument specifies the operation to perform on the processor set pset for real time extension. The following values are sup- ported: Configure the specified processor set, pset, as an RTE processor set. The processor set may or may not have processors assigned at this point. If pset has processors assigned to it at the time of this request, these processors are made unavailable to the kernel daemons. External I/O interrupts and pending callouts on processors in pset are reassigned to processors in non-RTE processor sets in the system. The processor set attribute values are changed to default values for an RTE processor set. If pset has any assigned workload, it continues to execute in that processor set. The arg argument is ignored. Unconfigure the specified processor set pset as an RTE processor set. The processors, if any, in this processor set are made available to the kernel daemons. The system may redistribute the external I/O interrupts with availability of these processors. Pending callouts in the system are not redis- tributed to these processors. The processor set attribute values are restored to default values for a non-RTE processor set as applicable. If pset has any assigned workload, it continues to execute in that processor set. The arg argument is ignored. Return the ID of the first RTE processor set in the system. The pset and arg arguments are ignored. Return the ID of the next RTE processor set in the system after pset. The arg argument is ignored. Typically, is called to determine the first RTE processor set. is then called in a loop (until the call returns -1) to determine the IDs of the remaining RTE processor sets in the system. See pset_ctl(2) for additional processor set query operations. The function allows users to query all processor sets in the system, pro- cessors in a specific processor set, processor set given a processor, etc. A processor may be added to an RTE processor set using the function. In this case, the processor is made unavailable to the kernel dae- mons; external I/O interrupts and pending callouts on this processor are reassigned to processors in non-RTE processor sets in the system. Conversely, if a processor is removed from an RTE processor set and added to a non-RTE processor set, it is made available to the kernel daemons and for external I/O interrupts. Similarly, if a non-empty RTE processor set is destroyed, its processors are made available to the kernel daemons and for external I/O interrupts. Only a user with appropriate privileges may configure and unconfigure an RTE processor set. However, any user may query the IDs and con- figuration of RTE processor sets. Only a user with appropriate privileges may reassign processors into or out of an RTE processor set, change attribute values, or destroy an RTE processor set. Any user with EXEC permissions in an RTE processor set may run applications in that RTE processor set. HP-UX processor sets define processor set attributes to provide users explicit control in managing their processor set configuration and work load assignment among many users and applications (see pset_getattr(2) for details). A processor set is assigned default values for these attributes at creation time. The RTE processor sets attributes are assigned different default values at time of configuration. The supported attributes and their default values are: UID of the processor set owner. When a processor set is converted into an RTE pset, the owner of the pset changes to that of the effective uid of the calling process. The owner of the pset or a user with appropriate privilege can change this attribute using (See pset_setattr(2).) GID of processor set's owner group. When a processor set is converted into an RTE pset, the group of the pset changes to that of the effective gid of the calling process. The owner of the pset or a user with appropriate privilege can change this attribute using (See pset_setattr(2).) Access permissions for the processor set. When a processor set is converted to an RTE processor set, the permissions are reset such that the processor set owner has all per- missions, group has READ and EXEC permissions, and others have only READ permissions. The owner of the pset or a user with appro- priate privileges can change this attribute using (See pset_setattr(2).) Indicates the behavior on a request to bind a process or a thread to a processor set that does not contain any processors. For RTE processor sets, such a request is rejected by default. However, a user with appropriate privileges or a user with WRITE access to the pset can change the value of this attribute to allow deletion of an empty RTE processor set. See pset_getattr(2) for supported values. A flag to indicate if processors in the processor set are configured to receive external I/O interrupts or not. All processors in an RTE processor set are disabled to receive interrupts. This attribute cannot be enabled until the processor set is unconfigured as an RTE processor set. Indicates the behavior on a request to remove the last processor from a processor set if there are active processes and threads bound to the processor set. For RTE processor sets, such a request is rejected by default. However, a user with appropriate privileges or a user with WRITE access to the pset can change the value of this attribute to allow removal of the last processor from an RTE processor set even if the processor set is busy. See pset_setattr(2) for supported values. Indicates the behavior on a request to destroy a non-empty processor set. A non-empty processor set has at least one processor assigned to it. For RTE processor sets, such a request will be rejected by default. However, a user with appropriate privileges or a user with WRITE access to the pset can change the value of this attribute to allow deletion of an RTE processor set in use. See pset_setattr(2) for supported values. Indicates whether the physical processor cores in the RTE pset is enabled with logical processors (LCPUs). See pset_setattr(2) for details and supported values. Processor Set Support Use with to see if the processor set functionality is supported by the underlying HP-UX operating system version. Use with to see if the RTE processor set functionality is supported by the underlying HP-UX operating system version. Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns zero on successful completion for and requests. For and requests, the ID of an RTE processor set is returned if one is found. Otherwise, is returned and is set to indicate the error. ERRORS
fails if one or more of the following is true: The specified processor set pset is already configured as RTE processor set, and the request is issued. The request is invalid. The specified processor set pset is invalid. The specified processor set pset is not an RTE processor set, and request is issued. The request is and there is no other RTE processor set after pset. The RTE processor set functionality is not supported by the underlying HP-UX version. The user does not have necessary permissions to perform the requested operation. The specified processor set, pset, is a special, reserved processor set, and cannot be configured as an RTE processor set. EXAMPLES
Create a new processor set, and configure it as an RTE processor set: SEE ALSO
psrset(1M), pset_assign(2), pset_bind(2), pset_ctl(2), pset_destroy(2), pset_getattr(2), pset_setattr(2), sysconf(2), privileges(5). __pset_rtctl(2)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy