I have tried to show the file name whose size is greater than 200 byte in current directory.
Please help me.
ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt
#set -a x `cat out.txt`
i=0
`cat out.txt` | while
do
read x
echo $x
#re=200
j=0
if }" < "200" ]
then
echo $j
j=`expr $j... (2 Replies)
Hi,
I'm trying to figure out the best solution to the following problem, and I'm not
yet that much experienced like you. :-)
Basically I have to read a fairly large file, composed of "messages" , in order
to display all of them through an user interface (made with QT).
The messages that... (3 Replies)
I am new to Unix so will really appreciate if someone can guide me on this.
What I want to do is:
Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well.
2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Hi All,
I am having an XML tag like:
<detail sim_ser_no_1="898407109001000090"
imsi_1="452070001000090">
<security>ADM1=????</security>
<security>PIN1=????</security>
<security>PIN2=????</security>
... (2 Replies)
I am working on a script to unfold data for each column from a specific line of data and write output in a single line.
Input data looks like this.
2011-09-26 INF UM_10 UserMana Starting synchronization for security domain
14:37:31 080 gementSe .
rvice
I... (2 Replies)
I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting?
file1.html
<head>
<url>http://www.google.com</url>
</head>
file2.html
<head>... (6 Replies)
Hi,
can some one help me how to encrypt and decrypt a file.
AIM: reade user input, encrypt it and save it to file.
while decryption read the encrypted file decrypt it and save the output in some variable.
Example: consider we have Credentials.txt file with content username: password... (5 Replies)
Hi....
I have a data file, which I want to split and write to new file...it looks like this...
Column1 column2 Column 3
1 28.25 36.42 -----Read
5 28.26 36.42
10 28.23 36.43
15 28.22 36.43... (1 Reply)
Hi friend i have input as following XML file
<?xml version="1.0"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02">
<BkToCstmrDbtCdtNtfctn>
<GrpHdr><MsgId>LBP-RDJ-TE000000-130042430010001001</MsgId><CreDtTm>2013-01-04T03:21:30</CreDtTm></GrpHdr>... (3 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies
LEARN ABOUT OSF1
pthread_rwlock_init
pthread_rwlock_init(3) Library Functions Manual pthread_rwlock_init(3)NAME
pthread_rwlock_init - Initializes a read-write lock object.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr);
PARAMETERS
Read-write lock object to be initialized. Read-write lock attributes object that defines the characteristics of the read-write lock to be
initialized.
DESCRIPTION
This routine initializes a read-write lock object with the attributes specified by the read-write lock attributes object specified in attr.
A read-write lock is a synchronization object that serializes access to shared information that needs to be read frequently and written
only occasionally. A thread can acquire a read-write lock for shared read access or for exclusive write access.
Upon successful completion of this routine, the read-write lock is initialized and set to the unlocked state. If attr is set to NULL, the
default read-write lock attributes are used; the effect is the same as passing the address of a default read-write lock attributes object.
Once initialized, the lock can be used any number of times without being reinitialized.
Results of calling this routine are undefined if attr specifies an already initialized read-write lock or if rwlock is used without first
being initialized.
If this routine returns unsuccessfully, rwlock is not initialized and the contents of rwlock are undefined.
A read-write lock is a resource of the process, not part of any particular thread. A read-write lock is neither destroyed not unlocked
automatically when any thread exits. Because read-write locks are shared, they may be allocated in heap or static memory, but not on a
stack.
In cases where default read-write lock attributes are appropriate, you may use the PTHREAD_RWLOCK_INITIALIZER macro to statically initial-
ize the lock object without calling this routine. The effect is equivalent to dynamic initialization by a call to pthread_rwlock_init with
attr specified as NULL, except that no error checks are performed. Statically initialized read-write locks need not be destroyed using
pthread_rwlock_destroy.
Use the PTHREAD_RWLOCK_INITIALIZER macro as follows:
pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
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 system lacks the necessary resources to initialize the read-write lock. The implementation has detected an
attempt to reinitialize the read-write lock (a previously initialized, but not yet destroyed read-write lock object). The value specified
by attr is not a valid attributes block. Insufficient memory exists to initialize the read-write lock. The caller does not have privi-
leges to perform this operation.
ERRORS
None
RELATED INFORMATION
Functions: pthread_rwlock_destroy(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
pthread_rwlock_init(3)