03-05-2011
thanks
I already read your answer on the other thread. I have another problem. Please respond, thanks. and I apologize for always asking help.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Is there a way a command or a combination through which i can check the contents of a all files in a directory and get the return as the file names which contains the partiuclar string. (2 Replies)
Discussion started by: thepitzaboy
2 Replies
2. UNIX for Dummies Questions & Answers
Hi
This is my first day in Unix, and I am trying to copy a file called
holiday.txt from my D drive into the C drive folder called h
like currently i am in D drive, i want to copy my holiday.txt into
C\h (C drive, h folder)
i am able to copy the file in the same drive, but how to do the... (5 Replies)
Discussion started by: soujanya_srk
5 Replies
3. Shell Programming and Scripting
Can you please help me to edit parts of a file and write into a new file.
=====================================
Suppose I have a huge data dump in a file I need to search for a tag in that and cut few lines around that tag in the file. Is there a way to keep track of line numbers and operate on... (18 Replies)
Discussion started by: jayana
18 Replies
4. Shell Programming and Scripting
We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>"
FILE1.XML
1. <itemList>
2. <item type="Manufactured">
3. <resourceCode>431048</resourceCode>
4. ... (0 Replies)
Discussion started by: balrajg
0 Replies
5. Shell Programming and Scripting
Hi,
I need help searching through a large text file. I need to find a certain string within the text, and copy each line until another string appears.
The file looks like this:
>scf15164843
ATTAAAGGNNNGGAATTTCCCCAA
ATTACCGGCTTTAAANNNTTACCC
>scf15154847
CCGGGNNNTTTAAACCCGNGNGCC... (2 Replies)
Discussion started by: repiv
2 Replies
6. Shell Programming and Scripting
Dear Unix Gurus,
I am new to shell scripting and in the process of learing.
I am trying to find whether a file name has today's date in MMDDYYYY format.
I am using the following code and it doesn't seem like working.
#!/usr/bin/ksh
today=$(date '+%m%d%Y')
echo today: $today
file=`find... (4 Replies)
Discussion started by: shankar1dada
4 Replies
7. Shell Programming and Scripting
Hello all,
I am a newbie in awk. I am struggling in this problem for a long.Actually I have two files, filea and fileb. File a is actually a search key through it I have to find the corresponding japanese tag from file b.
filea contains the data like this:
sm982882 sm1893548
sm2420025... (3 Replies)
Discussion started by: csim_mohan
3 Replies
8. UNIX for Beginners Questions & Answers
Hello all. Is there a command to copy the contents of one file into another file as the first line? (1 Reply)
Discussion started by: 2metal4u
1 Replies
9. Shell Programming and Scripting
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
10. UNIX for Beginners Questions & Answers
In the below there are two generic .vcf files (genome.S1.vcf and genome.S2.vcf) in a directory. There wont always be two genaric files but I am trying to use bash to rename each of these generic files with specfic text (unique identifier) within in each .vcf. The text will always be different, but... (11 Replies)
Discussion started by: cmccabe
11 Replies
LEARN ABOUT OSF1
pthread_rwlock_tryrdlock
pthread_rwlock_tryrdlock(3) Library Functions Manual pthread_rwlock_tryrdlock(3)
NAME
pthread_rwlock_tryrdlock - Attempts to acquire a read-write lock for read access without waiting.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock);
PARAMETERS
Address of the read-write lock object to acquire for read access.
DESCRIPTION
This routine attempts to acquire a read-write lock for read access, but does not wait for the lock if it not immediately available.
If a thread already holds the lock for read access, the lock is granted and this routine returns. If no thread already holds the lock for
write access and there are no writers waiting to acquire the lock, the lock for read access is granted to the calling thread and this rou-
tine returns.
If some thread already holds the lock for write access, the calling thread will not acquire the read lock. Results are undefined if the
calling thread has already acquired a lock for write access on rwlock when this routine is called.
A thread can hold multiple, concurrent locks for read access on the same read-write lock. In a given thread, for each call to this routine
that successfully acquires the same read-write lock for read access, a corrresponding call to pthread_rwlock_unlock must be issued.
If the read-write lock object referenced by rwlock is not initialized, the results of calling this routine are undefined.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The read-write lock could not be acquired for read access because another thread already acquired it for write
access or is blocked and waiting for it for write access. The value specified by rwlock does not refer to an initialized read-write lock
object. The current thread already owns the read-write lock for writing. The lock for read access could not be acquired because the maxi-
mum number of read lock acquisitions for rwlock has been exceeded.
ERRORS
None
RELATED INFORMATION
Functions: pthread_rwlock_init(3), pthread_rwlockattr_init(3), pthread_rwlock_rdlock(3), pthread_rwlock_wrlock(3), pthread_rwlock_unlock(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
pthread_rwlock_tryrdlock(3)