## Boolean expressions for If's

Boolean expressions for If's
# 1
08-22-2011
Boolean expressions for If's

1. The problem statement, all variables and given/known data:
Im experimenting with if expressions for an assignment. What i want to do is check if an input of will be checked against x for 1-999 for y for [ASDM] and for z for 1-999. Am i doing this right? or perhaps you could tell me whats the proper expression for such an example.

2. Relevant commands, code, scripts, algorithms:

P.S. I am using cygwin in windows to do this script.

3. The attempts at a solution (include all code and scripts):

4. Insearch: (University of Technology Sydney), Sydney NSW, Australia, James Hu (web systems), Information Technology Local - UTS:INSEARCH

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

EDIT:

ive also tried this but it doesnt work either.

EDIT2: after further research i end up with

with a case to filter out "y" for the right values. Yet my code still isnt working. Any ideas?

---------- Post updated at 09:28 PM ---------- Previous update was at 08:31 PM ----------

Never mind i figured it out what i did wrong that is. I needed to restate the variable im comparing to after the -o and the -o should be a -a. You may close this thread now :P!

Last edited by Ren_kun; 08-22-2011 at 09:05 AM..
 Ren_kun View Public Profile for Ren_kun Find all posts by Ren_kun

## If statement with two boolean conditions

#!/bin/bash if && then echo "True" else echo "False" fi Hi everyone, I am new to UNIX, here I have a if statement elevating two boolean conditions. I thought the output should be True because there are + in the statement. But it turns out to be False. Can anyone...

## Boolean expression

hi, im learning python language. and my teacher gives me this question on class: Boolean expression : not (p or not q) what is the correct answer for that? i still dont understand, and please give me a link for a new beginner in python to learn. thanks

## 'AND' boolean not working !!!!

Dear all, IT seems to be rather small issue, but is not resolved. What Google suggest does no work..! #!/bin/bash date jobNo=\$(awk '/Jobs with...

## boolean expression in bash

Can someone, please, help me to make this condition valid/accepted in bash? I really cannot. I'm stuck with the brackets... This one tells me: missing `]' if ]; then # NOTIFY ERROR... fi And... I'd also appreciate a link to bash documents that explain these things. All...

## Find Boolean operators help

I was reading this find guide and I saw something with the -and option that I don't think is correct. Do you need the -and option in this? \$ find /mp3-collection -name 'Metallica*' -and -size +10000k I found my file that was bigger than 500 MB with and without the -and option. ~ \$ find /...

## Boolean expression issues

Hi everybody: I'm working on a script to send emails with logs attached based on one single rule..."check if the number of errors has increased since the last time the script ran" Basically what my script does is read from a previous file with the last trace of errors the previous error...

## set boolean after comparison

Hi there, Sorry if the title doesn't mean much to you, I don't know how to sum up my pb in one line. I'd like to set a value to 0 or 1 depending on the result of a comparison. Here's what I do: supernova:~# a= supernova:~# isempty=\$(] && echo 1 || echo 0) supernova:~# echo \$isempty 1...

## Regular expression boolean in perl

How can I find out, that whether a regular expression are matched or not(as a boolean)?! tnx in advance.

## boolean parameter

Hi, I'm calling an oracle procedure from shell script, this procedure has boolean parameter, the default is false, but I need to pass true value to the procedure... how can I do that in shell script , below is my script: ################ Initialise Environment ################# initialise()...

## trying to get a boolean response from sed

I have a file coming in with many columns, but the first character of the the coumn is a record type, if I wanted to get a true/false kind of response as to whether it contains at least one of each type of record how would be best? sed -e '/01/!d; /02/!d; /03/!d; /04/!d' datafile returns...