06-24-2009
what have you tried till now??
I will give you some hint..
use sed there is an option called "n" and "N" read man page and give it a try...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi :),
I am using the script to search "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER.
But my problem is that at some occurrence my footer is different e.g. ";". How to modify the script so that MYPATTERN between HEADER and different... (1 Reply)
Discussion started by: vanand420
1 Replies
2. Shell Programming and Scripting
Hi
I have a file (say 'file1')and I want to search for a first occurence of pattern (say 'ERROR') and print ten lines in the file below pattern. I have to code it in PERL and I am using Solaris 5.9.
I appreciate any help with code
Thanks
Ammu (6 Replies)
Discussion started by: ammu
6 Replies
3. Shell Programming and Scripting
Dear Experts,
I have file called file1 in which i am greping a pattern after that i want to next 3 lines when that pattern is matched.
Ex:- file1
USA
UK
India
Africa
Hello
Asia
Europe
Australia
Hello
Peter
Robert
Jo
i want to next 3 lines after matching Hello... (12 Replies)
Discussion started by: naree
12 Replies
4. Shell Programming and Scripting
i have a file as below
sample.pl
parameter1
argument1
argument2
parameter2
I want out as below
argument1
argument2
that is , i want to print all the lines between parameter1 & parameter 2.
i tried with the following
if($mystring =~ m/parameter1(.*?)parameter2/) (2 Replies)
Discussion started by: roopa
2 Replies
5. Shell Programming and Scripting
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
I have a file that contains...
Number
--------------------
1
2
3
4
i want to print all the numbers after the hyphen ... (6 Replies)
Discussion started by: ankitknit
6 Replies
7. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
8. Shell Programming and Scripting
Hi all,
I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found.
I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line.
fgrep -o... (2 Replies)
Discussion started by: MonikaB
2 Replies
9. Shell Programming and Scripting
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
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
LEARN ABOUT DEBIAN
pthread_setconcurrency
PTHREAD_SETCONCURRENCY(3) Linux Programmer's Manual PTHREAD_SETCONCURRENCY(3)
NAME
pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency level
SYNOPSIS
#include <pthread.h>
int pthread_setconcurrency(int new_level);
int pthread_getconcurrency(void);
Compile and link with -pthread.
DESCRIPTION
The pthread_setconcurrency() function informs the implementation of the application's desired concurrency level, specified in new_level.
The implementation only takes this as a hint: POSIX.1 does not specify the level of concurrency that should be provided as a result of
calling pthread_setconcurrency().
Specifying new_level as 0 instructs the implementation to manage the concurrency level as it deems appropriate.
pthread_getconcurrency() returns the current value of the concurrency level for this process.
RETURN VALUE
On success, pthread_setconcurrency() returns 0; on error, it returns a nonzero error number.
pthread_getconcurrency() always succeeds, returning the concurrency level set by a previous call to pthread_setconcurrency(), or 0, if
pthread_setconcurrency() has not previously been called.
ERRORS
pthread_setconcurrency() can fail with the following error:
EINVAL new_level is negative.
POSIX.1-2001 also documents an EAGAIN error ("the value specified by new_level would cause a system resource to be exceeded").
VERSIONS
These functions are available in glibc since version 2.1.
CONFORMING TO
POSIX.1-2001.
NOTES
The default concurrency level is 0.
Concurrency levels are only meaningful for M:N threading implementations, where at any moment a subset of a process's set of user-level
threads may be bound to a smaller number of kernel-scheduling entities. Setting the concurrency level allows the application to give the
system a hint as to the number of kernel-scheduling entities that should be provided for efficient execution of the application.
Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the concurrency level has no meaning. In other words, on Linux
these functions merely exist for compatibility with other systems, and they have no effect on the execution of a program.
SEE ALSO
pthread_attr_setscope(3), pthreads(7)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2009-04-10 PTHREAD_SETCONCURRENCY(3)