05-14-2008
Right but how do I handle this in a scenario where I don't know the number of view occurance ?
Thanks again,
Daya
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello,
I am trying to parse an error returned by a command inside the if statement but it is just displays the full error instead and then stops.
if ; then
echo "no such package"
else
echo "similar version found will use pkgrm"
fi
the above code just displays
please let me know... (2 Replies)
Discussion started by: rakeshou
2 Replies
2. Shell Programming and Scripting
:b:hi,
I have a script as given below:
pr_det="1"
if
then
awk ' BEGIN {printf("%23s","session")}' >> report.txt
awk ' BEGIN {printf "\n"} ' >> report.txt
else
awk ' BEGIN {printf("%55s","file_dsc")} ' >> report.txt
awk ' BEGIN {printf("%101s","no_recs")} '... (1 Reply)
Discussion started by: jisha
1 Replies
3. Shell Programming and Scripting
year=`date '+%Y'`
month=`date '+%m'`
day=`date '+%d'`
day=`expr $day - 1`
case $month in
1 | 3 | 5 | 7 | 8 | 10 | 12);;
if($day =7 ); then
$day=6
fi
4 | 6 | 9 | 11);;
if ; then
$day=31
fi
2);;
if ; then
if ; then (2 Replies)
Discussion started by: dannyd_y
2 Replies
4. Shell Programming and Scripting
HI i am getting error while executing the given statement
for filename in `cat a/file.lst`
do
if then
echo "Exit Code Description :File $filename - is missing in Input Directory" >a.log
exit
else
count1=`awk 'END {print NR}' $filename`
echo "$count1">>a.log
count2=`awk 'END {print... (4 Replies)
Discussion started by: ravi214u
4 Replies
5. Shell Programming and Scripting
hi,
When i try to run the code below, i get the following error
"ksh: syntax error: `(' unexpected"
i am not able to figure it out. Can anyone help me?
Code: (2 Replies)
Discussion started by: ragavhere
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
This is my script to catch any oracle errors.
In this, the $sqlerr returns
ORA-01017: invalid username/password; logon denied
when i specify wrong username/password
the if condition is failing. how can i resolve the issue.
the if statement gives error
sqloutput=`sqlplus -s -L... (1 Reply)
Discussion started by: Swapna173
1 Replies
7. Shell Programming and Scripting
I am working on script for stale nfs.
the file consists of
cat data01stale.log
- - - - /abcd/backup
- - - - /abcd/data
Script (16 Replies)
Discussion started by: nareshkumar522
16 Replies
8. Shell Programming and Scripting
Hi
Can you please tell me what is wrong with this line:
if && ]; then
basically i want to check if x = 12 and F (Filename) end with 'g'. But it is throwing syntax error. (7 Replies)
Discussion started by: rtagarra
7 Replies
9. Shell Programming and Scripting
Can anybody tell the correct way to use the following awk pattern check within an if statement?
When I run this command outside of the if statement
cat /tmp/test2.out | awk -v T=$TIME -v G=$GROUP -v C=$CDATE '$0 ~ T && $0 ~ G && $0 ~ C' | grep -i "Starting the group"
I get the following... (0 Replies)
Discussion started by: kieranfoley
0 Replies
10. UNIX for Beginners Questions & Answers
hello all
im new to unix and when i use below script i get an error :
#! /bin/bash
Echo -e "enter the name of the file : \c"
read file_name
if
then
echo "$file_name found"
else
echo "$file_name not found"
fi
running the script i get below error :
$ ./hello (26 Replies)
Discussion started by: Ibrahims1
26 Replies
LEARN ABOUT SUNOS
rsm_intr_signal_wait
rsm_intr_signal_post(3RSM) Remote Shared Memory Library Functions rsm_intr_signal_post(3RSM)
NAME
rsm_intr_signal_post, rsm_intr_signal_wait - signal or wait for an event
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include <rsmapi.h>
int rsm_intr_signal_post(void *memseg, uint_t flags);
int rsm_intr_signal_wait(void *memseg, int timeout);
DESCRIPTION
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions are event functions that allow synchronization between importer processes
and exporter processes. A process may block to wait for an event occurance by calling rsm_intr_signal_wait(). A process can signal a wait-
ing process when an event occurs by calling rsm_intr_signal_post().
The rsm_intr_signal_post() function signals an event occurance. Either an import segment handle (rsm_memseg_import_handle_t) or an export
segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. If memseg refers to an import han-
dle, the exporting process is signalled. If memseg refers to an export handle, all importers of that segment are signalled. The flags argu-
ment may be set to RSM_SIGPOST_NO_ACCUMULATE; this will cause this event to be discarded if an event is already pending for the target seg-
ment.
The rsm_intr_signal_wait() function allows a process to block and wait for an event occurance. Either an import segment handle (rsm_mem-
seg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument.
The process blocks for up to timeout milliseconds for an event to occur; if the timeout value is -1, the process blocks until an event
occurs or until interrupted.
RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.
ERRORS
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions can return the following error:
RSMERR_BAD_SEG_HNDL Invalid segment handle.
The rsm_intr_signal_post() function can return the following error:
RSMERR_CONN_ABORTED Connection aborted.
RSMERR_REMOTE_NODE_UNREACHABL Remote node not reachable.
The rsm_intr_signal_wait() function can return the following errors:
RSMERR_INTERRUPTED Wait interrupted.
RSMERR_TIMEOUT Timer expired.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
rsm_memseg_get_pollfd(3RSM), attributes(5)
SunOS 5.10 7 Nov 2002 rsm_intr_signal_post(3RSM)