Sponsored Content
Top Forums Shell Programming and Scripting How to write If statement using && and operator in Unix Post 302526683 by Avi on Wednesday 1st of June 2011 07:04:01 AM
Old 06-01-2011
How to write If statement using && and operator in Unix

Hi

What is the syntax for if statement using && and || operator?
Code:
if [ [ "$ModuleBName" = "XYZ" ] && [ "$Status" != "IN PROGRESS" ] ] || [ "$Status" = "ABORTED" ]

here its giving me an error to this if statement

any suggestion??

Last edited by Franklin52; 06-01-2011 at 08:05 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

what is the difference between Unix & linux, what are the advantages & disadvantages

ehe may i know what are the difference between Unix & Linux, and what are the advantages of having Unix as well as disadvantages of having Unix or if u dun mind i am dumb do pls tell me what are the advantages as well as the disadvantages of having linux as well. thanks (1 Reply)
Discussion started by: cybertechmkteo
1 Replies

2. Shell Programming and Scripting

if statement with two conditions -e, &&

Wow I'm so zoned out I don't even know if I posted this question up already (I couldn't find it in my book marks or in "yesterday's" post). My question is, I'm writing a korn script that does something like the following, but I don't yet completely understand the syntax. I need to check that... (16 Replies)
Discussion started by: yongho
16 Replies

3. Shell Programming and Scripting

using && in if statement ..

Hi All, Can some one tell me how to get run the following: data1="hello" data2="world" if then { echo "good afternnon" } else { echo " good morning" } fi The above code gives me an error ad below : ./if.h: line 3: ' (7 Replies)
Discussion started by: jisha
7 Replies

4. Shell Programming and Scripting

multiple conditions in if using && operator

VARIABLE="project" if && ] then echo "VARIABLE is not empty" fi this is not working what is wrong in the syntax?? (2 Replies)
Discussion started by: codeman007
2 Replies

5. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

6. Shell Programming and Scripting

Alternative to && operator

"Both cases have to be true for the expression to evaluate "true". is that not so. the following code does a read from a txt file, an then suppose to do the deletion ,but although the condition exists, its not performing the deletion && echo "\n\t Deleting printer ${prt} !!!" if !... (5 Replies)
Discussion started by: ggoliath
5 Replies

7. Programming

IF && statement problem

Hello there, My first time on the forums, glad to be here :) I'm completely new to programming in PHP and I have a question which I hope someone could help me with. I am currently using this statement: if(($session == 2) && ($item == Dagger) && ($item2 == Dagger)){ ... (5 Replies)
Discussion started by: Hero
5 Replies

8. Shell Programming and Scripting

if statement with '&&' gives error

Hi, I'm using the && operator in if statement: if ; then exp $UID/$PWD@$ORACLE_SID FILE=./DUMP/$TODAY$CONCAT_STR$USERNAME.dmp STATISTICS=NONE LOG=./LOG/$TODAY$CONCAT_STR$USERNAME.log elif ; then expdp $UID/$PWD@$ORACLE_SID DIRECTORY=./DUMP/ DUMPFILE=$TODAY$CONCAT_STR$USERNAME.dmp... (8 Replies)
Discussion started by: priya001
8 Replies

9. Shell Programming and Scripting

Using && in if statement with 3 expressions

how do you write an if statement for something like if ((expr 1 >= expr 2 && expr 3 >= expr 4) && expr 5 <= expr 6) if ((TRUE && TRUE) && TRUE) then condition... i've done it this way but it doesn't seem to work. if (] && "$ex_day" -le "$curr_day" ); then condition... (3 Replies)
Discussion started by: angilulu
3 Replies

10. Shell Programming and Scripting

Linux Platform - NDM Script - && Operator

Hi All, I have a requirement where i need to NDM 3 files from LINUX to Mainframe system & trigger a job in mainframe once the 3 files are transmitted successfully. I am getting an error message in the && operator (the code component where i am checking whether step 1/2/3 are completed). ... (2 Replies)
Discussion started by: dsfreddie
2 Replies
DROP OPERATOR 
FAMILY(7) SQL Commands DROP OPERATOR FAMILY(7) NAME
DROP OPERATOR FAMILY - remove an operator family SYNOPSIS
DROP OPERATOR FAMILY [ IF EXISTS ] name USING index_method [ CASCADE | RESTRICT ] DESCRIPTION
DROP OPERATOR FAMILY drops an existing operator family. To execute this command you must be the owner of the operator family. DROP OPERATOR FAMILY includes dropping any operator classes contained in the family, but it does not drop any of the operators or functions referenced by the family. If there are any indexes depending on operator classes within the family, you will need to specify CASCADE for the drop to complete. PARAMETERS
IF EXISTS Do not throw an error if the operator family does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing operator family. index_method The name of the index access method the operator family is for. CASCADE Automatically drop objects that depend on the operator family. RESTRICT Refuse to drop the operator family if any objects depend on it. This is the default. EXAMPLES
Remove the B-tree operator family float_ops: DROP OPERATOR FAMILY float_ops USING btree; This command will not succeed if there are any existing indexes that use operator classes within the family. Add CASCADE to drop such indexes along with the operator family. COMPATIBILITY
There is no DROP OPERATOR FAMILY statement in the SQL standard. SEE ALSO
ALTER OPERATOR FAMILY [alter_operator_family(7)], CREATE OPERATOR FAMILY [create_operator_family(7)], ALTER OPERATOR CLASS [alter_opera- tor_class(7)], CREATE OPERATOR CLASS [create_operator_class(7)], DROP OPERATOR CLASS [drop_operator_class(7)] SQL - Language Statements 2010-05-14 DROP OPERATOR FAMILY(7)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy