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
CSQRT(3)						     Linux Programmer's Manual							  CSQRT(3)

NAME
csqrt, csqrtf, csqrtl - complex square root SYNOPSIS
#include <complex.h> double complex csqrt(double complex z); float complex csqrtf(float complex z); long double complex csqrtl(long double complex z); Link with -lm. DESCRIPTION
These functions calculate the complex square root of z, with a branch cut along the negative real axis. (That means that csqrt(-1+eps*I) will be close to I while csqrt(-1-eps*I) will be close to -I, if eps is a small positive real number.) VERSIONS
These functions first appeared in glibc in version 2.1. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------------------------+---------------+---------+ |Interface | Attribute | Value | +----------------------------+---------------+---------+ |csqrt(), csqrtf(), csqrtl() | Thread safety | MT-Safe | +----------------------------+---------------+---------+ CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. SEE ALSO
cabs(3), cexp(3), complex(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 CSQRT(3)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy