Sponsored Content
Full Discussion: add not equal in script.
Top Forums Shell Programming and Scripting add not equal in script. Post 302170665 by myguess21 on Tuesday 26th of February 2008 09:20:31 AM
Old 02-26-2008
Hi Yogesh, i tried yesterday also. I have char & numeic value (lg. ge45678).
I got some good result but still getting similar valuses too. is there something diffrent i can try?

Quote:
Originally Posted by Yogesh Sawant
if in case you are trying to compare numeric values, use -ne instead of !=
!= is for string comparison
 

9 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Bash Script verify user input is not empty and is equal to a value

I need to create a script that has a user enter a value. I want to verify that the value is either 1,2, or 3. If it is not then I want them to try entering it again. I am using a while loop to force them to retry. I am able to test the input against 1,2, and 3, but when I test agains an... (4 Replies)
Discussion started by: spartiati
4 Replies

3. Shell Programming and Scripting

equal to operator

Hi, I have the below script executed arg="dir" if "$arg" = "dir" then echo "true" else echo "false" fi Please let me know what happens in the if command. My output is: dir: dir: No such file or directory false which is not the desired output. When i used test command... (1 Reply)
Discussion started by: anijan
1 Replies

4. 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

5. Shell Programming and Scripting

awk field equal something, then add something to the field

Hi Everyone, a.txt a b c 1 e e e e e a b c 2 e e e e e the output is a b c 1 e e e e e a 00b c 2 e e e e e when 4th field = '2', then add '00' in the front of 2nd field value. Thanks (9 Replies)
Discussion started by: jimmy_y
9 Replies

6. Shell Programming and Scripting

awk script replace positions if certain positions equal prescribed value

I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX. awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies

7. Shell Programming and Scripting

Not equal to in Unix

Guys, I am trying to do below operation LAST_TRANSACTION=2 if ]; then # do something fi If the LAST_TRANSACTION variable is not equal to 1 or 2 or 3 then code inside the if block should be execute. This code is not working, Any help is appreciated. (7 Replies)
Discussion started by: gowrishankar05
7 Replies

8. 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

9. 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
wsreg_components_equal(3WSREG)			    Product Install Registry Library Functions			    wsreg_components_equal(3WSREG)

NAME
wsreg_components_equal - determine equality of two components SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...] #include <wsreg.h> int wsreg_components_equal(const Wsreg_component *comp1, const Wsreg_component *comp2); DESCRIPTION
The wsreg_components_equal() function determines if the component specified by the comp1 argument is equal to the component specified by the comp2 argument. Equality is evaluated based only on the content of the two components, not the order in which data was set into the components. RETURN VALUES
The wsreg_components_equal() function returns a non-zero value if the component specified by the comp1 argument is equal to the component specified by the comp2 argument. Otherwise, 0 is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
wsreg_clone_component(3WSREG), wsreg_create_component(3WSREG), wsreg_initialize(3WSREG), attributes(5) SunOS 5.10 22 Sep 2000 wsreg_components_equal(3WSREG)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy