Sponsored Content
Full Discussion: Not equal to in Unix
Top Forums Shell Programming and Scripting Not equal to in Unix Post 302530718 by amitbisht9 on Tuesday 14th of June 2011 11:37:30 PM
Old 06-15-2011
you have used OR '||' operator instead of AND '&&'..so when it is checking the first condition that $LAST_TRANSACTION is not eqal to 1, it gets true and condition inside IF loop gets executed. SmilieSmilie
 

9 More Discussions You Might Find Interesting

1. Programming

Looking for equal to Visual Studio for Unix

Hello all Im looking for IDE to edit / compile / debug similar to VC++ on windows I need it for verity of UNIX platforms, what do you think is the best tool to use And that its learning carve is easy ( as much as possible) . Thanks (9 Replies)
Discussion started by: umen
9 Replies

2. Solaris

Stop+A equal

Hi, I have replaced my current Intel PC machine with Solaris 10, it use to have windows XP. I am sure alot of people already done this and i have seen Solaris running smoothly but having keyboard problem. What is the equal keys in a QWERTY keyboard for selection <Stop+A> ? Is there a... (5 Replies)
Discussion started by: tlee
5 Replies

3. Shell Programming and Scripting

Regex NOT EQUAL help

I have the following line to text: ExecuteQueue Name=default ThreadCount=60 I want to write a sed or awk function that eliminates everything before "ThreadCount" without taking into account what is actually in front of ThreadCount. Meaning there may be text in front of "ThreadCount" other... (6 Replies)
Discussion started by: ArterialTool
6 Replies

4. Shell Programming and Scripting

My Values are Equal but They are Not

Does anybody understand why this is not being interpreted as true. Script: #!/bin/bash errored=`grep "errored" new_update_scripts.txt` echo $errored = "errored" if ; then echo true else echo false fi Output: $ UpdateScripts errored = errored false (7 Replies)
Discussion started by: scottwmackey
7 Replies

5. Shell Programming and Scripting

while [ $x -ge 50 ] + and equal to zero ; then

while + and equal to zero ; then what to punt instead of phrase and equal to zero. it's bash thank you in advance (1 Reply)
Discussion started by: losh
1 Replies

6. Shell Programming and Scripting

If not equal to then loop

How do I go about amending this simple script that prompts for a yes/no response so that if neither Y or N are entered it will loop back back to the original prompt #!/bin/ksh echo "Enter yes of no" read answer if then echo "You selected yes" elif then echo "You selected no" elif... (5 Replies)
Discussion started by: gmears
5 Replies

7. UNIX for Dummies Questions & Answers

Same strings are not equal

Hi there can anyone help me please. I want to make a program to check if the executable file specified by the user exists in the directory. When I run this program particulary these lines of code does not work: if ("$fi" == "$name") then where It checks whether the specified file is equal to the... (1 Reply)
Discussion started by: FUTURE_EINSTEIN
1 Replies

8. UNIX for Dummies Questions & Answers

Want the UNIX code - I want to sum of the 1st column wherever the first 2nd and 3rd columns r equal

I have the code for the below things.. File1 has the content as below 8859 0 subscriberCreate 18 0 subscriberPaymentMethodChange 1650 0 subscriberProfileUpdate 7668 0 subscriberStatusChange 13 4020100 subscriberProfileUpdate 1 4020129 subscriberStatusChange 2 4020307 subscriberCreate 8831... (5 Replies)
Discussion started by: Mahen
5 Replies

9. UNIX for Advanced & Expert Users

awk not equal

Did I do something wrong with this awk not equal? For some reason it prints twice. >awk '{if ($4 != "root") print $1 " " $4 " " $5}' ls_test server10: njs nodeadm server10: njs nodeadm >grep server10 ls_test server10: drwxr-sr-x. 18 njs nodeadm 4096 Aug 16 09:42 /opt > (2 Replies)
Discussion started by: cokedude
2 Replies
pthread_cond_wait(3T)													     pthread_cond_wait(3T)

NAME
pthread_cond_wait(), pthread_cond_timedwait() - wait or timed wait on a condition variable SYNOPSIS
Parameters cond Pointer to the condition variable to be waited on. mutex Pointer to the mutex associated with the condition variable cond. abstime Absolute time at which the wait expires, even if the condition has not been signaled or broadcast. DESCRIPTION
The function is used to wait for the occurrence of a condition associated with the condition variable cond. The function is used to wait a limited amount of time for the occurrence of a condition associated with the condition variable cond. The abstime parameter specifies the time at which this function should time out. If the absolute time specified by abstime passes and the indicated condition has not been signaled, the function returns an error to the caller. Note: abstime is the time at which the wait expires, not the length of time the thread will wait. The condition variabled denoted by cond must have been dynamically initialized by a call to or statically initialized with the macro Both functions should be called with mutex locked by the calling thread. If mutex is not locked by the calling thread, undefined behavior will result. These functions atomically release mutex and cause the calling thread to block on the condition variable cond. If another thread is able to acquire the mutex after the about-to-block thread has released it but before it has actually blocked, a subsequent call to or by the other thread will behave as if it were issued after the about-to-block thread has blocked. When the condition is signaled or the timed wait expires, the caller is unblocked and will reacquire mutex before returning. Whether these functions succeed or fail, mutex will always be reacquired before returning to the caller. Using different mutexes for concurrent calls to these functions on the same condition variable results in undefined behavior. When using condition variables, there is a predicate associated with the condition wait. If this predicate is false, the thread should perform a condition wait. Spurious wakeups may occur when waiting on a condition variable. A spurious wakeup occurs when a thread returns from a condition wait when it should really continue waiting. A normal signal being delivered to a thread may cause a spurious wakeup dur- ing a condition wait. Since the return values from and do not imply anything about the value of the predicate, the predicate should be re- evaluated. A condition wait is a When the calling thread has deferred cancellation enabled, cancellation requested will be acted upon. If a cancella- tion request is acted upon while a thread is blocked in one of these functions, mutex is reacquired before calling the cancellation cleanup handlers. The cancellation cleanup handlers should release mutex so that application deadlock does not occur. If the condition signal and the cancellation request both occur, the canceled thread will not consume the condition signal (i.e., a different thread will be unblocked due to the condition signal). If a signal is delivered to a thread waiting for a condition variable, upon return from the signal handler, the thread may return zero due to a spurious wakeup or continue waiting for the condition. RETURN VALUE
and return the following values: Successful completion. Failure. An error number is returned to indicate the error. (The variable is not set.) ERRORS
The following error value is returned by if the corresponding condition is detected. abstime has passed and a condition signal has not been received. One of the following error values is returned by and if the corresponding condition is detected. A cond, mutex, or abstime parameter points to an illegal address. The value specified by cond, mutex, or abstime is invalid. mutex is not owned by the calling thread. This error is not returned for a or mutex on HP-UX. Different mutexes are being used for cond. This error is not detected on HP-UX. WARNINGS
It is important to note that when or return without error, the associated predicate may still be false. When returns with the timeout error, the associated predicate may be true. It is recommended that a condition wait be enclosed in the equivalent of a "while loop," which checks the predicate. Undefined behavior results if these functions are called with a mutex. EXAMPLES
is recommended to be used in a loop testing the predicate associated with it. This will take care of any spurious wakeups that may occur. is also recommended to be used in a loop. This function can return success even if the predicate is not true. It should be called in a loop while checking the predicate. If the function times out, the predicate may still have become true. The predicate should be checked before processing the timeout case. The example given below does not do any other error checking. AUTHOR
and were derived from the IEEE POSIX P1003.1c standard. SEE ALSO
pthread_cond_init(3T), pthread_cond_signal(3T). STANDARDS CONFORMANCE
Pthread Library pthread_cond_wait(3T)
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy