Sponsored Content
Top Forums Shell Programming and Scripting Checking multiple conditions in UNIX IF-ELSE Post 302813319 by kumarjt on Monday 27th of May 2013 04:56:28 AM
Old 05-27-2013
Thanks a ton to all you guys , your help is truly appreciated .

But what difference does the double quotes around the shell variable make ?

Why without the double quotes the IF-ELSE conditions is not matching , but using them works wonders ?

Can you please guide me on the significance of double quoting shell variables and the way Unix interprets them while comparing?

All I know about double quote usage is that it is tolerant to variable expransions while single quote considers literal values of the constituent string.

Thanks
Kumarjit.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

multiple conditions in if/then

Hello, I am having trouble with the syntax with a conditional statement in a BASH script involving multiple conditions. Any suggestions would be greatly appreciated! if ; then array=("${array}" "$dnNum" ) fi i receive this error: ./testscript: ' (4 Replies)
Discussion started by: grandtheftander
4 Replies

2. Shell Programming and Scripting

multiple if conditions

Guys, Im trying to have a script that evaluates multiple conditions : test.sh: if then echo "host $1" else if then echo "host $1" else echo $1 not valid exit 1 fi when I do ./test.sh brazil1 I get: (4 Replies)
Discussion started by: bashshadow1979
4 Replies

3. Shell Programming and Scripting

Help regarding multiple conditions

Hi All, I am new to shell scripting. Can any one say what is wrong in this if statement, that uses multiple conditions if then *************** else if ( -z $pcs && "$night_time_calc" > "$night_time" ) then ******************************** ... (4 Replies)
Discussion started by: ssenthilkumar
4 Replies

4. Shell Programming and Scripting

Checking conditions with AWK

Input File1 0BB2 2A11 Split,FriApr80625,1507_7RAID5 0BF6 2829 Synchronized,FriJan140653,1507_7RAID5 0BF6 282A Split,FriApr80625,1507_7RAID5 0C7C 199E Synchronized,FriJan140653,1507_7RAID5 0C7C 1BCC Split,FriApr80625,1507_7RAID5 0DCA 0A9B ... (12 Replies)
Discussion started by: greycells
12 Replies

5. UNIX for Dummies Questions & Answers

Multiple Find Conditions in IF Statement - UNIX

When I try the below if Condition with single condition its working fine. But when I try to Club both its working . But giving wrong results. In my case cond1 = -f ${filename1} = true cond2 = -f ${filename2} = true But Cond1 & Cond2 is resulting in False ??? Please advise ... (5 Replies)
Discussion started by: Shiny_Reddy
5 Replies

6. UNIX for Dummies Questions & Answers

If + multiple conditions

Hello Unix-Forums! It has been a long time since my last post, but finally I've got a new question: I know in case you can use multiple patterns by case $var in a|b|c|ab) and so on. But how would I place an OR between if ] then ... if ] then ... I want to execute the "..." if... (3 Replies)
Discussion started by: intelinside
3 Replies

7. Shell Programming and Scripting

Checking Multiple File existance in a UNIX folder(Note: File names are all different)

HI Guys, I have some 8 files with different name and extensions. I need to check if they are present in a specific folder or not and also want that script to show me which all are not present. I can write if condition for each file but from a developer perspective , i feel that is not a good... (3 Replies)
Discussion started by: shankarpanda003
3 Replies

8. Shell Programming and Scripting

Checking File record equal to multiple of 70 or nearest number to multiple of 70

Hello, I have a file with below content - Example 3 6 69 139 210 345 395 418 490 492 I would like the result as - Multiple of 70 or nearest number in the file less than the multiple of 70 69 139 (5 Replies)
Discussion started by: Mannu2525
5 Replies

9. Shell Programming and Scripting

Multiple conditions in IF

Fellas, Am new to unix os/ and here the situation , I am trying to write multiple condition statement inside if but it throws me a error here is my piece of code , if ] && ] && ] then commands fi error : line 15 : ` can someone please advise me how to fix it Please use... (7 Replies)
Discussion started by: xeccc5z
7 Replies

10. UNIX for Beginners Questions & Answers

Multiple If conditions

I am analyzing one of the scripts written by another person.script is having multiple if conditions and everything are nested.The code is not formatted properly.Is there any way to identify in Unix to identify begin and end of a particular if block? (6 Replies)
Discussion started by: vamsi.valiveti
6 Replies
gnutls-cli-debug(1)						   User Commands					       gnutls-cli-debug(1)

NAME
gnutls-cli-debug - GnuTLS debug client SYNOPSIS
gnutls-cli-debug [-flag [value]]... [--opt-name[[=| ]value]]... Operands and options may be intermixed. They will be reordered. DESCRIPTION
TLS debug client. It sets up multiple TLS connections to a server and queries its capabilities. It was created to assist in debugging GnuTLS, but it might be useful to extract a TLS server's capabilities. It connects to a TLS server, performs tests and print the server's capabilities. If called with the `-v' parameter more checks will be performed. Can be used to check for servers with special needs or bugs. OPTIONS
-d number, --debug=number Enable debugging.. This option takes an integer number as its argument. The value of number is constrained to being: in the range 0 through 9999 Specifies the debug level. -V, --verbose More verbose output. This option may appear an unlimited number of times. -p number, --port=number The port to connect to. This option takes an integer number as its argument. The value of number is constrained to being: in the range 0 through 65536 -h, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -v [{v|c|n}], --version[={v|c|n}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. EXAMPLES
$ ../src/gnutls-cli-debug localhost Resolving 'localhost'... Connecting to '127.0.0.1:443'... Checking for SSL 3.0 support... yes Checking whether %COMPAT is required... no Checking for TLS 1.0 support... yes Checking for TLS 1.1 support... no Checking fallback from TLS 1.1 to... TLS 1.0 Checking for TLS 1.2 support... no Checking whether we need to disable TLS 1.0... N/A Checking for Safe renegotiation support... yes Checking for Safe renegotiation support (SCSV)... yes Checking for HTTPS server name... not checked Checking for version rollback bug in RSA PMS... no Checking for version rollback bug in Client Hello... no Checking whether the server ignores the RSA PMS version... no Checking whether the server can accept Hello Extensions... yes Checking whether the server can accept small records (512 bytes)... yes Checking whether the server can accept cipher suites not in SSL 3.0 spec... yes Checking whether the server can accept a bogus TLS record version in the client hello... yes Checking for certificate information... N/A Checking for trusted CAs... N/A Checking whether the server understands TLS closure alerts... partially Checking whether the server supports session resumption... yes Checking for export-grade ciphersuite support... no Checking RSA-export ciphersuite info... N/A Checking for anonymous authentication support... no Checking anonymous Diffie-Hellman group info... N/A Checking for ephemeral Diffie-Hellman support... no Checking ephemeral Diffie-Hellman group info... N/A Checking for ephemeral EC Diffie-Hellman support... yes Checking ephemeral EC Diffie-Hellman group info... Curve SECP256R1 Checking for AES-GCM cipher support... no Checking for AES-CBC cipher support... yes Checking for CAMELLIA cipher support... no Checking for 3DES-CBC cipher support... yes Checking for ARCFOUR 128 cipher support... yes Checking for ARCFOUR 40 cipher support... no Checking for MD5 MAC support... yes Checking for SHA1 MAC support... yes Checking for SHA256 MAC support... no Checking for ZLIB compression support... no Checking for max record size... no Checking for OpenPGP authentication support... no EXIT STATUS
One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) The operation failed or the command syntax was not valid. 70 (EX_SOFTWARE) libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. SEE ALSO
gnutls-cli(1), gnutls-serv(1) AUTHORS
Nikos Mavrogiannopoulos, Simon Josefsson and others; see /usr/share/doc/gnutls-bin/AUTHORS for a complete list. COPYRIGHT
Copyright (C) 2000-2012 Free Software Foundation all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later. BUGS
Please send bug reports to: bugs@gnutls.org NOTES
This manual page was AutoGen-erated from the gnutls-cli-debug option definitions. 3.1.18 20 Dec 2013 gnutls-cli-debug(1)
All times are GMT -4. The time now is 07:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy