Hi,
I need to check whether one file has EOF or not.
There's one daemon in our system, which will pick the files FTPed to us. However, sometimes the daemon picks the file before FTP is finished.
So I'm planning to add some checking of EOF on the FTPed files in the shell script.
Could... (8 Replies)
Guys, Im trying to have a script that evaluates multiple conditions :
test.sh:
if
then
echo "host $1"
else
if
then
echo "host $1"
else
echo $1 not valid
exit 1
fi
when I do
./test.sh brazil1
I get: (4 Replies)
if -o ]
then
echo "Expected valid value"
The above multiple if condition is NOT working in my script.
I am getting the error as '-a' not expected. Can anyone help with the syntax for this? (5 Replies)
Hi All,
I am new to shell scripting.
Can any one say what is wrong in this if statement, that uses multiple conditions
if
then
***************
else
if ( -z $pcs && "$night_time_calc" > "$night_time" )
then
********************************
... (4 Replies)
Hi folks
I m creating script which is give me below error.
$ ./function.ksh
./function.ksh: here document `EOF' unclosed
Inside the script is
#!/bin/ksh
export ORACLE_SID=OECDV1
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export PATH=$ORACLE_HOME/bin:$PATH
echo "sql is... (3 Replies)
I am needing to include some if statements within an expect script. These will need to have two conditions under an AND join. Upon a successful IF condition I want to set multiple variables.
I have tried a lot of variations of the below statement with no success. I have also searched the WEB... (2 Replies)
I have written this script. This is used for creating a backup folder.
#!/bin/sh
#set -x
. /home/.profile
usage="Usage is $0"
usage="$usage "
# Use the getopt utility to set up the command line flags.
set -- `/usr/bin/getopt b: $*`
# Process individual command line arguments
while ;... (1 Reply)
Hi Guys,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (1 Reply)
Hi All,
I am trying to place one SQL query in Shell Script with Where Condition as Status='1' But after running the the script it is returning error as
SQL0206N "1" is not valid in the context where it is used. SQLSTATE=42703
The query is working fine in Data Base.
Please suggest... (1 Reply)
I am analyzing one of the scripts written by another person.script is having multiple if conditions and everything are nested.The code is not formatted properly.Is there any way to identify in Unix to identify begin and end of a particular if block? (6 Replies)
Discussion started by: vamsi.valiveti
6 Replies
LEARN ABOUT HPUX
pthread_condattr_setpshared
pthread_condattr_getpshared(3T)pthread_condattr_getpshared(3T)NAME
pthread_condattr_getpshared(), pthread_condattr_setpshared() - get or set the process-shared attribute
SYNOPSIS PARAMETERS
attr Pointer to the condition variable attributes object whose process-shared attribute is to be set/retrieved.
pshared This parameter either specifies the new value of the process-shared attribute (set function) or it points to the memory
location where the process-shared attribute of attr is to be returned (get function).
DESCRIPTION
The attributes object attr must have been previously initialized with the function before these functions are called.
The functions are used to set and retrieve the process-shared attribute in a condition variable attributes object. The legal values for
the process-shared attribute are:
This option permits a condition variable to be operated upon by any thread
that has access to the memory where the condition variable is allocated. The application is responsible for allocating the
condition variable in memory that multiple processes can access.
The condition variable can be operated on only by threads created within
the same process as the thread that initialized the condition variable. If threads of differing processes attempt to operate
on such condition variable, the behavior is undefined.
The default value of process-shared is
sets the process-shared attribute in attr. The new value of the process-shared attribute of attr is set to the value specified in the
pshared parameter.
retrieves the value of the process-shared attribute from attr. The value of the process-shared attribute of attr is returned in the
pshared parameter.
RETURN VALUE
Upon successful completion, and return zero. Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
If any of the following occur, the and functions return the corresponding error number:
is not defined and these functions are not supported.
For each of the following conditions, if the condition is detected, the function returns the corresponding error number:
attr is not a valid condition variable attributes object.
The value specified by
pshared is not a legal value.
For each of the following conditions, if the condition is detected, the function returns the corresponding error number:
The value specified by
attr or pshared is invalid.
WARNINGS
If a condition variable is created with the process-shared attribute defined as the cooperating processes should have access to the memory
in which the condition variable is allocated.
AUTHOR
and were derived from the IEEE POSIX P1003.1c standard.
SEE ALSO pthread_create(3T), pthread_condattr_init(3T), pthread_cond_init(3T), pthread_mutex_init(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_condattr_getpshared(3T)