Sponsored Content
Top Forums Shell Programming and Scripting Searching and printing only required pattern Post 302885974 by omkar.jadhav on Wednesday 29th of January 2014 09:35:20 AM
Old 01-29-2014
Searching and printing only required pattern

Hi all,

i am trying to count the number of logical processors from the below output:
Code:
 
# print_manifest | grep "logical processors"
        8 cores, 16 logical processors per socket
               2 logical processors (2 per socket)

i just want to have below output :
16
2
also the search pattern should be irrespective of "per socket" word and must be purely based on (<digits> logical processors ) pattern

can someone help me in getting desired result..maybe using awk or sed..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pattern searching pattern in c files

I have a problem in searching a specific pattern in c files. My requirement: I have to find all the division operator in all cfiles. The problem is, the multi line comments and single line comments will also have forward slash in it. Even after avoiding these comments also, if both... (6 Replies)
Discussion started by: murthybptl
6 Replies

2. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

3. UNIX for Dummies Questions & Answers

Help required on Printing of Numbers, which are missing in the range

Hi Experts, Need help on printing of numbers, which are missing in the range. Pls find the details below Input 1000000002 1000000007 1234007940 1234007946 Output 1000000003 1000000004 1000000005 1000000006 1234007941 (2 Replies)
Discussion started by: krao
2 Replies

4. Shell Programming and Scripting

Searching using awk - Help required

Hi... I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving syntax error near unexpected token `(' Request... (5 Replies)
Discussion started by: ysrikanth
5 Replies

5. Shell Programming and Scripting

Searching for a pattern and extracting records related to that pattern

Hi there, Looking forward to your advice for the below: I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs. Sample: I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies

6. Shell Programming and Scripting

Searching and printing the only pattern using awk,sed or perl

Hi All, i have an output of command vmstat as below : $ vmstat System configuration: lcpu=4 mem=5376MB ent=1.00 kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------------------- r b avm fre re pi... (10 Replies)
Discussion started by: omkar.jadhav
10 Replies

7. Shell Programming and Scripting

Help required in searching of pattern.

i m searching a zone file my domain name is abcd.com my zone file looks like this. abcd.com. IN SOA ns1.abcd.com. root.abcd.com. ( abcd.com. 400 IN A 15.1.1.1 Then i am searching that abcd.com have if below ip... (14 Replies)
Discussion started by: learnbash
14 Replies

8. 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

9. Shell Programming and Scripting

Help required in printing in specific format

Hi All, I 'm matching two files based on the first 2 columns and then populate other fields along with subtraction of few fields. I have managed to get the output. However, is there a easier way in formatting the output as shown below instead of using additional printf for getting fixed width... (4 Replies)
Discussion started by: shash
4 Replies

10. Shell Programming and Scripting

Echo not printing the variables with delimiters as required

This is the file which contains only neccessary values from the output of curl command i.e TEMP_FILE Proxy Hostname server0123.domain.com Proxy IP address XXX.XXX.XX.XX port 0000 Proxy Version SGOS X.X.X.X Proxy Serial # ... (5 Replies)
Discussion started by: ramprabhum
5 Replies
pset_destroy(2) 						System Calls Manual						   pset_destroy(2)

NAME
pset_destroy() - destroy a processor set SYNOPSIS
DESCRIPTION
The function destroys the processor set pset, releasing all constituent processors and processes by default. The processors and processes are reassigned to the system default processor set. Once destroyed, the pset identifier becomes available for new processor sets that may be created in the future. The behavior when attempting to destroy a non-empty processor set may be controlled by changing the attribute of the processor set through the function. See pset_getattr(2). The following values are supported for the attribute: Reassign all processors in the pset to the system default processor set. Migrate all threads and processes bound to the pset to the system default proces- sor set. Make the request fail with if there are any threads or processes bound to pset or if there are processors assigned to the pset. Make the request fail with only if there are active threads or processes bound to the processor set. Otherwise, perform the operation by reassigning the processors in the pset to the system default processor set. If the threads and processes being reassigned to the default processor set have some binding to a processor or a locality domain in the pset being destroyed, their binding is reassigned to a processor or a locality domain in the system default processor set. A user with the privilege or a user with WRITE permission on the pset may destroy the processor set pset. The system default processor set may never be destroyed. 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. Note on Logical Processor and Hyper-Threading Feature On systems with the Hyper-Threading (HT) feature enabled at the firmware level, each processor core may have more than one hyper-thread per physical processor core. Each hyper-thread is represented to the operating system and applications as a logical processor (LCPU). Due to the processor set contract, which specifies that applications bound to a processor set have complete and exclusive control of all processor cores within that processor set, migration of processors between two processor sets is done at the processor core granularity. For destruction of a processor set migrates a set of processor cores to the default processor set. Depending on the source processor set and the default processor set's the number of logical processors visible to the users and applications may change. EXAMPLES
Destroy a processor set with the processor set ID of pset. RETURN VALUE
returns zero on successful completion. Otherwise, -1 is returned and is set to indicate the error. ERRORS
fails if one or more of the following is true: The attribute value for the processor set does not allow deletion of a non-empty processor set. The operation was interrupted. pset is not a valid processor set. The processor set functionality is not supported by the underlying HP-UX version. The user does not have necessary permissions to destroy a processor set or the system default processor set was specified. SEE ALSO
psrset(1M), pset_assign(2), pset_bind(2), pset_create(2), pset_ctl(2), pset_getattr(2), privgrp(4), privileges(5). pset_destroy(2)
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy