Sponsored Content
Top Forums Shell Programming and Scripting Using boolean expression Bash script Post 302966249 by RudiC on Wednesday 10th of February 2016 04:49:06 AM
Old 02-10-2016
I'd love to - if I only understood what you're after.
The mentioned scriptlet creates a 32-bit binary equivalent of an IP4 address and then XORs it with another. So - analyzing and testing it line by line could help you do what you need.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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. (2 Replies)
Discussion started by: Zaxon
2 Replies

2. Shell Programming and Scripting

[Bash]Function returning a boolean

Hello all, I would like to know if it is possible to return a the result of a boolean expression from a function like this function() { # some code return || } and what will be the return value ? Thank you for help. (6 Replies)
Discussion started by: dolphin06
6 Replies

3. Shell Programming and Scripting

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... (3 Replies)
Discussion started by: hyunkel_01
3 Replies

4. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: mamboknave
2 Replies

5. UNIX for Dummies Questions & Answers

Im new to bash scriping and i found this expression on a bash script what does this mean.

# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi espeacailly the top regex part? ---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Discussion started by: kevin298
1 Replies

6. Shell Programming and Scripting

Hi im new to bash scripting I want to know what does the regex expression do ??

# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi (1 Reply)
Discussion started by: kevin298
1 Replies

7. Shell Programming and Scripting

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 (1 Reply)
Discussion started by: jazzyzha
1 Replies

8. Shell Programming and Scripting

Getting error in bash script; expr $a + 1: integer expression expected

Hi, I am new to shell/bash script. I am trying to run below script #!/bin/bash a=0 b=10 if then echo "a is equal to be" else echo "a is not equal to be" fi MAX=10 while do echo $a a='expr $a + 1' done (1 Reply)
Discussion started by: Mallikgm
1 Replies

9. Shell Programming and Scripting

How to assign result of boolean expression?

Hello I would to write the test on one line like : declare -i x=0 y=0 ........ some code assign value 0 or 1 to x and y ........ # if either x or y or both is set to 1, then do something if -o ; then do_something fi Any help is welcome (2 Replies)
Discussion started by: jcdole
2 Replies

10. UNIX for Beginners Questions & Answers

How to write a Boolean variable which succeed and failed inside the if loop in shell script ?

I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger. if ] then echo "Only satisfied variable with value" ... (3 Replies)
Discussion started by: prince1987
3 Replies
Mail::SPF::Mech::IP4(3) 				User Contributed Perl Documentation				   Mail::SPF::Mech::IP4(3)

NAME
Mail::SPF::Mech::IP4 - SPF record "ip4" mechanism class DESCRIPTION
An object of class Mail::SPF::Mech::IP4 represents an SPF record mechanism of type "ip4". Constructors The following constructors are provided: new(%options): returns Mail::SPF::Mech::IP4 Creates a new SPF record "ip4" mechanism object. %options is a list of key/value pairs representing any of the following options: qualifier ip_network See "new" in Mail::SPF::Mech. new_from_string($text, %options): returns Mail::SPF::Mech::IP4; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech Creates a new SPF record "ip4" mechanism object by parsing the string and any options given. Class methods The following class methods are provided: default_qualifier default_ipv4_prefix_length qualifier_pattern See "Class methods" in Mail::SPF::Mech. name: returns string Returns 'ip4'. name_pattern: returns Regexp Returns a regular expression that matches a mechanism name of 'ip4'. See Mail::SPF::Mech for other supported class methods. Instance methods The following instance methods are provided: text qualifier params stringify See "Instance methods" in Mail::SPF::Mech. ip_network: returns NetAddr::IP Returns the IP address network parameter of the mechanism. match($server, $request): returns boolean Returns true if the mechanism's "ip_network" equals or contains the given request's IP address, or false otherwise. See RFC 4408, 5.6, for details. SEE ALSO
Mail::SPF, Mail::SPF::Record, Mail::SPF::Term, Mail::SPF::Mech <http://www.ietf.org/rfc/rfc4408.txt> For availability, support, and license information, see the README file included with Mail::SPF. AUTHORS
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> perl v5.12.1 2010-07-05 Mail::SPF::Mech::IP4(3)
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy