01-31-2012
He already has a thread about this, wherein the rapidly-changing file has been replaced with a pipe which causes it to be read continually, which is an improvement on it not being read at all.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Discussion started by: girigopal
0 Replies
2. Shell Programming and Scripting
Hi , I need an Awk script to parse my log file .
2008-04-26 10:00:13,391 INFO Logger - <?xml version="1.0" encoding="UTF-8" standalone="no"?><2dm
tmsg... (0 Replies)
Discussion started by: amit1_x
0 Replies
3. Shell Programming and Scripting
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
Discussion started by: MissI
3 Replies
4. Shell Programming and Scripting
Hi All,
I have an xml file with the below format.
<a>111</a><b>222</b><c>333<c><d><e>123</e><f>234</f><d><e>456</e><f>789</f>
output needed is
111,222,333,123,234
111,222,333,456,789
nawk 'BEGIN{FS="<|>"}
{print a,b,c,e,f
a=""
... (7 Replies)
Discussion started by: natalie23
7 Replies
5. UNIX for Dummies Questions & Answers
Thanks in advance who can answer.
I have to make a small shell that after reading an XML file and extract the fields I create a text file with the same fields taken previously in tabular form.
I did this
parse.awk
----------------------
BEGIN {
FS=""
}
{
for(i=2; i<=NF; i+=2) {
... (1 Reply)
Discussion started by: mcarlo65
1 Replies
6. Shell Programming and Scripting
Hi all!
I'm looking to write a quick script and in it I need to request an XML file from a service running on localhost and parse that XML file and output it. I'm looking to do it in bash although it doesn't really matter what shell it is in. The XML file returned would look like this:
... (3 Replies)
Discussion started by: mtehonica
3 Replies
7. Shell Programming and Scripting
Hi,
I have to make an script according to these:
- I have couples of files like:
xxxxxxxxxxxxx.csv
xxxxxxxxxxxxx_desc.xml
- every xml file has diferent fields, but keeps this format:
........
<defaultName>2011-02-25T16:43:43.582Z</defaultName>
........... (2 Replies)
Discussion started by: Pluff
2 Replies
8. Shell Programming and Scripting
Well, that's what I'd do in bash :) Here's what I have so far:
import urllib2
from BeautifulSoup import BeautifulStoneSoup
xml = urllib2.urlopen('http://weatherlink.com/xml.php?user=blah&pass=blah')
soup = BeautifulStoneSoup(xml)
print soup.prettify()
but all it does is grab the html... (0 Replies)
Discussion started by: unclecameron
0 Replies
9. Shell Programming and Scripting
Hello Guys,
Please help with AWK problem. I have XML file which contains a list of messages for subjects.
Example of the messages:
, message=, message=, message=, message=, message=, message=, message=, message=
I want to use AWK to parse these xml messages but I am... (7 Replies)
Discussion started by: James_Owen
7 Replies
10. Shell Programming and Scripting
I have an XML tag like this:
<property name="agent" value="/var/tmp/root/eclipse" />
Is there way using awk that i can get the value from the above tag. So the output should be:
/var/tmp/root/eclipse
Help will be appreciated.
Regards,
Adi (6 Replies)
Discussion started by: asirohi
6 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)