Sponsored Content
Top Forums Shell Programming and Scripting How to write If statement using && and operator in Unix Post 302526685 by Franklin52 on Wednesday 1st of June 2011 07:09:55 AM
Old 06-01-2011
Try:
Code:
if [[ "$ModuleBName" = "XYZ" && "$Status" != "IN PROGRESS" || "$Status" = "ABORTED" ]]

or:
Code:
if [ "$ModuleBName" = "XYZ" -a "$Status" != "IN PROGRESS" -o	 "$Status" = "ABORTED" ]

 

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 
CLASS(7) SQL Commands DROP OPERATOR CLASS(7) NAME
DROP OPERATOR CLASS - remove a user-defined operator class SYNOPSIS
DROP OPERATOR CLASS name USING access_method [ CASCADE | RESTRICT ] INPUTS name The name (optionally schema-qualified) of an existing operator class. access_method The name of the index access method the operator class is for. CASCADE Automatically drop objects that depend on the operator class. RESTRICT Refuse to drop the operator class if there are any dependent objects. This is the default. OUTPUTS DROP OPERATOR CLASS The message returned if the command is successful. DESCRIPTION
DROP OPERATOR CLASS drops an existing operator class from the database. To execute this command you must be the owner of the operator class. NOTES The DROP OPERATOR CLASS statement is a PostgreSQL language extension. Refer to CREATE OPERATOR CLASS [create_operator_class(7)] for information on how to create operator classes. USAGE
Remove B-tree operator class widget_ops: DROP OPERATOR CLASS widget_ops USING btree; This command will not execute if there are any existing indexes that use the operator class. Add CASCADE to drop such indexes along with the operator class. COMPATIBILITY
SQL92 There is no DROP OPERATOR CLASS in SQL92. SQL - Language Statements 2002-11-22 DROP OPERATOR CLASS(7)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy