Sponsored Content
Top Forums UNIX for Dummies Questions & Answers issue with multiple logical operators Post 302450159 by frank_rizzo on Wednesday 1st of September 2010 09:42:11 PM
Old 09-01-2010
remove the outer brackets.

Code:
if [[ "$ida" == "_W_" || "$ida" == "_SA" ]] && [[ "$chk_dy" == "Sun" || "$chk_dy" == "Sat" ]]; then
   echo "id is $ida and chk_dy is $chk_dy"
fi

This User Gave Thanks to frank_rizzo For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

multiple Logical statement

hi I have following if condition line_by_line="0000000000000tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt" if then echo "Exclusion criteria" else echo "Not exclusion criteria" fi above condition works perfectley but if i add one more logical condition... (3 Replies)
Discussion started by: mahabunta
3 Replies

2. Shell Programming and Scripting

Multiple Logical Operator Issues ...

Hi folks I have a snippet of code Which is like this If ( ( A || B || C ) && D ) then Do some thing.... elif exit fi How to rephrase this and use it so I dont get any Errors ... Looking out for helpful replies .. Thanks & Regards Srikanth GR (1 Reply)
Discussion started by: srikanthgr1
1 Replies

3. UNIX for Dummies Questions & Answers

Multiple Process issue

Hello all, First of all, I want to thank the forum for being so helpful to me in many occasions. I have searched through the forums and the internet. I couldnt find a perfect solution for my issue. Here is what Im trying to do.. Im verifying a bunch of jobs whether they are completed or not... (1 Reply)
Discussion started by: jntgopal
1 Replies

4. Shell Programming and Scripting

How to do logical AND and logical OR with grep

Hi can someone please help me on this. I need to perform this code: Grep any lines that meets the following criteria (A AND B) OR (A AND C) I tried this code, but it didn't work Grep-I "A &&B" | "A&&C" *.* $ thanks in advance (12 Replies)
Discussion started by: Needhelp2
12 Replies

5. Shell Programming and Scripting

Can you use logical operators in a case statement (bash)?

I'm pretty sure I already know the answer to this, but I want to make sure I'm not overlooking anything. I'm working on a log monitoring script and every 10 lines I want to display a summary of events. The thing is, there are a lot of possible events, that likely won't have happened, so I only want... (0 Replies)
Discussion started by: DeCoTwc
0 Replies

6. Shell Programming and Scripting

Precedence in operators issue

Hello, I am trying to write a small acript to change directory to $HOME depending on the user logged in. However when i provide this command say, ABC_USER=myself cd ~${ABC_USER} i am getting the following error, ksh: ~myself: not found I know i am doing something really silly but... (4 Replies)
Discussion started by: arvindspr06
4 Replies

7. Shell Programming and Scripting

ksh Multiple Pattern Matching Operators

I figured this would be simple, but I am stuck. Variable longpath="/dir1/dir2/dir3/filename.stuff.morestuff.garbage" I want to end up with just "filename.extra.moreextra". So, I want to get rid of the path and .garbage I want to do this with just ksh internals. So, no sed,grep,awk,expr,... (4 Replies)
Discussion started by: Topaz
4 Replies

8. Shell Programming and Scripting

How to use logical operators in multiple if statement

Hi I want to send a status mail if daily or weekly or monthly batch completed or aborted. Here is the code. if && && || Else if && && || Else if && && || then mailx –s “Status Report” sumone@sumthing.com else print ”try again” Plz suggest the changes. (3 Replies)
Discussion started by: Avi
3 Replies

9. Shell Programming and Scripting

Implementing operators on multiple fields

Hallo Friends, Have a look at my script: awk -F',' '$14==9100' *_201304*.csv|wc -l > pax1; awk -F',' '$14==9101' *_201304*.csv|wc -l >>pax1; awk -F',' '$14==9102' *_201304*.csv|wc -l >>pax1; awk -F',' '$14==9103' *_201304*.csv|wc -l >>pax1 I would like to include field 42. like below ... (9 Replies)
Discussion started by: kekanap
9 Replies

10. UNIX for Beginners Questions & Answers

Issue with search and replacing multiple items in multiple files

Im having an issue when trying to replace the first column with a new set of values in multiple files. The results from the following code only replaces the files with the last set of values in val.txt. I want to replace all the files with all the values. for date in {1..31} do for val in... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
sundials-config(1)						     SUNDIALS							sundials-config(1)

NAME
sundials-config - returns required flags for linking to SUNDIALS libraries SYNOPSIS
sundials-config -m {cvode|cvodes|ida|kinsol} -t {s|p} -l {c|f} [-s {libs|cppflags}] [-hv] DESCRIPTION
sundials-config provides a way to obtain various configuration options for compiling programs that use SUNDIALS OPTIONS
-m {cvode|cvodes|ida|kinsol} Select the SUNDIALS module -t {s|p} Use serial of parallel vectors -l {c|f} Use C or Fortran -s {libs|cppflags} Show linking flags or C preprocessor flags (show both of no option is given) -h Get usage and options information -v View the script NOTES
-lf is not valid for -m cvodes -s cppflags returns an empty string for -l f AUTHOR
Radu Serban <radu@llnl.gov> This manual page was written by Andrey Romanenko for the Debian system (but may be used by others). Permission is granted to copy, dis- tribute and/or modify this document under the terms of the &gnu; General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. SEE ALSO
SUNDIALS Documentation 2006-07-25 sundials-config(1)
All times are GMT -4. The time now is 12:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy