11-08-2011
I can't believe how simple that was, it works now. You have my sincere gratitude !
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I have a program that runs two threads in stead of two processes. I want to use pipe to redirect the output of the first thread to the input of the second thread.
One thread is continuously writing to a pipe, and the other thread will read from the pipe.
How do I do that?
Is there... (2 Replies)
Discussion started by: wminghao
2 Replies
2. Programming
I know how to read and write if i have a forked process with only one child. However what is involved with reading and writing with many forked processes. Say one parent that forks 5 children, and needs to communicate with all 5 in half duplex.
int temp, counter=0;
do{
pipe(temp);
... (5 Replies)
Discussion started by: steveneliuk
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
5. Programming
how to read and write on pipes to communicate with each other? (5 Replies)
Discussion started by: nimesh
5 Replies
6. UNIX Desktop Questions & Answers
Hi,
I am trying to convert multiple Unix pipe symbol or bar into single |. I have tried with the following sed statements, but, no success :(. I need it using sed only
echo "sed 's/\|\+/\|/g'
sed 's/*/\|/'
sed 's/\|*/|/'
sed -r 's/\|+/\|/'
However, the below awk code is working fine.... (4 Replies)
Discussion started by: royalibrahim
4 Replies
7. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
8. UNIX for Dummies Questions & Answers
I have a script that finds all sffs and extracts them into .fastq file types. What I need to do is change the .fastq to .fasta using the below script. How can I change the input.fastq and output.fasta to mirror the file's name? Would I use an array and use the default iterator?
#!/bin/bash
... (3 Replies)
Discussion started by: jrymer
3 Replies
9. Shell Programming and Scripting
Single command to ls all the files inside a particular directory hierachy and output this to a file and open this in a vim file so that i can use gf command in vim to browse through all the files inside this hierachy.
eg :
dir1/dir2
and
dir1/dir3
dir2 and dir3 contain the files i need... (7 Replies)
Discussion started by: dll_fpga
7 Replies
10. UNIX for Beginners Questions & Answers
The task I have to do is something along the lines "I receive some input and based on the first character I send it through pipe to one of the children to print".
The scheme it is based on is 1->2; 1->3; 1->4; 2 will print all the input that starts with a letter, 3 will print all the input that... (2 Replies)
Discussion started by: Ildiko
2 Replies
LEARN ABOUT OSF1
simple_lock_try
simple_lock_try(9r) simple_lock_try(9r)
NAME
simple_lock_try - General: Tries to assert a simple lock
SYNOPSIS
#include <kern/lock.h>
boolean_t simple_lock_try(
simple_lock_t slock_ptr );
ARGUMENTS
Specifies a pointer to a simple lock structure. You can declare this simple lock structure by using the decl_simple_lock_data routine.
DESCRIPTION
The simple_lock_try routine tries to assert a lock with read and write access for the resource associated with the specified simple lock.
The main difference between this routine and simple_lock is that simple_lock_try returns immediately if the resource is already locked,
while simple_lock spins until the lock has been obtained. Thus, call simple_lock_try when you need a simple lock but the code cannot spin
until the lock is obtained.
To release a simple lock successfully asserted by simple_lock_try, call the simple_unlock routine.
RETURN VALUES
The simple_lock_try routine returns one of the following values: The simple_lock_try routine successfully asserted the simple lock. The
simple_lock_try routine failed to assert the simple lock.
FILES
SEE ALSO
Routines: decl_simple_lock_data(9r), simple_lock(9r), simple_lock_init(9r), simple_lock_terminate(9r), simple_unlock(9r)
Data Structures: slock(9s)
simple_lock_try(9r)