Sponsored Content
Full Discussion: Bash -o -v -R operators
Top Forums UNIX for Beginners Questions & Answers Bash -o -v -R operators Post 303012691 by RudiC on Wednesday 7th of February 2018 02:35:50 PM
Old 02-07-2018
How about testing / checking / verifying what you learned in small steps, e.g. by running the small snippet posted? And then only proceeding to a more complex example?

For your above problem (totally different story!): elif needs an additional test and a then keyword... c.f. man bash.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

If with set operators

Hi guys, I'm trying to run more than one "if" condition at once. What I want is something like if ] or ] or ]; then ... I can't remember the syntax for using this or/and set operators. Can someone please assist/ jog my memory? thanks Khoom (2 Replies)
Discussion started by: Khoomfire
2 Replies

2. UNIX for Dummies Questions & Answers

Operators

I am trying to understand Does the following: {tmp+=$10} Mean take $10 and add them all up and call it tmp thanks! (2 Replies)
Discussion started by: llsmr777
2 Replies

3. Shell Programming and Scripting

And and OR Operators with If Statement.

Hi All, I have 2 variables. Result1 and Result2. I want to put a condition that if Both are True then echo "All True" Else Show Error. Right now i am doing this and getting error. if ; then echo "All True" else echo "Failed" fi; Error. line 8: ' Solution: Looking for (2 Replies)
Discussion started by: mkashif
2 Replies

4. Shell Programming and Scripting

Operators

I really don't know the meaning of these operators. Could someone explain the meanings so I can make my test for today? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

5. Homework & Coursework Questions

Operators

I really don't know the meaning of these operators. Could someone explain the meanings? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

6. 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

7. Shell Programming and Scripting

BASH - set specific user variable via string operators

Apologies for the utter triviality of this question, but we all have to start somewhere! I've also tried searching but this question is pretty vague so I didn't (a) really know what to search for or (b) get many relevant hits to what I did search for. Anyway, I'm in the process of self-teaching... (1 Reply)
Discussion started by: u5j84
1 Replies

8. Shell Programming and Scripting

operators in if loop

Hi all, I have a variable which is having the value like below, $ echo ${p} 8 15 22 30 $ My requirement is that the variable should return true when it contains only one number like below, $ echo ${p} 15 $ Otherwise, it should return false if it contains more than one number. I... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

9. Shell Programming and Scripting

awk and Unary Operators in Bash

I am getting the following error /home/hagbard/chaos/resip/ictja/siculet-0.0.0/amvib/tmspan.sh: line 135: BEGIN {printf "%.0f", int((tm-(thh*60.0*60.0))/60.0)}: No such file or directory /home/hagbard/chaos/resip/ictja/siculet-0.0.0/amvib/tmspan.sh: line 138: The code is this ... (3 Replies)
Discussion started by: kristinu
3 Replies
QSIEVE(1)						    BSD General Commands Manual 						 QSIEVE(1)

NAME
qsieve, qsafe -- generate system moduli file SYNOPSIS
qsieve [megabytes bits [initial]] qsafe [trials [generator]] DESCRIPTION
The qsieve utility will list candidates for Sophie-Germaine primes (where q = (p-1)/2) to standard output. The list is checked against small known primes (less than 2**30). This step is both processor and memory intensive. The megabytes value sets a limit for the internal sieve buffer. This should be small enough to remain entirely in memory. Swap thrashing can increase the run time from hours to days or weeks! When the megabytes value is zero (0), qsieve will select a default suitable for the bits. The bits value sets the length of the generated possible primes (typically 768, 1024, 1536, 2048, 3072, or 4096, although others can be used for variety). The optional initial value (hex) specifies the beginning of the search. Otherwise, qsieve generates a randomly selected number. The qsafe utility will perform a Miller-Rabin primality test on the list of candidates (checking both q and p) from standard input. The result is a list of so-call "safe" primes to standard output, suitable for use as Diffie-Hellman moduli. This step is merely processor intensive. The trials value sets the number of Miller-Rabin interations (typically 16 to 128). The optional generator value (hex) limits testing to candidates with a specific generator (usually 2). Otherwise, qsafe will test each can- didate and suggest a generator. SEE ALSO
moduli(5) HISTORY
These programs were originally developed for the Photuris project, and later the OpenSSH project. BSD
July 28, 1997 BSD
All times are GMT -4. The time now is 02:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy