I was trying to run a code to check if a fax number is empty or not.
for that, I've written the following code which is throwing an error.
#!/bin/ksh
fax= "999-999-9999"
if ; then
fax_no="000-000-0000"
else
fax_no=$fax
fi
echo $fax_no
And I get the... (7 Replies)
OS Environment: HP-UX B.11.31 U ia64
I am using the shell script code to connect to Oracle RAC database.
Passing the parameter of cluster database name.
typeset -l DB_ID=$1
+ typeset -l DB_ID=sivDB
#---- 3. SetDB validation -------------
if ; then
print... (3 Replies)
Hi Friends,
I have an input file like this
chr1 100 200
chr1 200 300
chr1 300 400
chr1 400 500
chr1 500 600
chr1 600 700
chr1 700 800
chr1 800 900
chr1 900 920
chr1 940 960
I would like to get the first line's second column and the fifth line's 3rd column as one single line. This... (13 Replies)
Hi,
I have file
#cat drivers.txt
fcs0
fcs1
vscsi1
vscsi2
In this i need to check the availabality of "fcs" or "vscsi" alone not vscsi0,fcs1
I tried with "if condition" but it is not working.
cat drivers.txt| while read ADAP
do
echo "Checking for $ADAP"
if ;then
echo "FC... (9 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
I have a unix shell script generate.sh that writes to a file hello.txt using redirect.
For example:echo " Today's report shows progress by: " > hello.txt
This hello.txt is then send as an email body to the recipients.
My requirement is to have this special characters(up arrow and down arrow... (6 Replies)
Everyday I have to get a list of files in a directory with a special condition and feed this list to a for loop to be processed. Since I do not use Unix all the time, it is tricky for me to get that list of files. So, the question is whether there are commands that will give me the file names... (12 Replies)
Discussion started by: april
12 Replies
LEARN ABOUT MOJAVE
pthread_cond_init
PTHREAD_COND_INIT(3) BSD Library Functions Manual PTHREAD_COND_INIT(3)NAME
pthread_cond_init -- create a condition variable
SYNOPSIS
#include <pthread.h>
int
pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
DESCRIPTION
The pthread_cond_init() function creates a new condition variable, with attributes specified with attr. If attr is NULL the default
attributes are used.
RETURN VALUES
If successful, the pthread_cond_init() function will return zero and put the new condition variable id into cond, otherwise an error number
will be returned to indicate the error.
ERRORS
The pthread_cond_init() function will fail if:
[EINVAL] The value specified by attr is invalid.
[ENOMEM] The process cannot allocate enough memory to create another condition variable.
[EAGAIN] The system temporarily lacks the resources to create another condition variable.
SEE ALSO pthread_cond_broadcast(3), pthread_cond_destroy(3), pthread_cond_signal(3), pthread_cond_timedwait(3), pthread_cond_wait(3),
pthread_condattr(3)STANDARDS
The pthread_cond_init() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').
BSD November 4, 2006 BSD