Sponsored Content
Full Discussion: If inside If loop
Top Forums Shell Programming and Scripting If inside If loop Post 302827875 by millan on Monday 1st of July 2013 04:19:28 AM
Old 07-01-2013
You have to write the first if clause as below.

Code:
 
if ([ "$ServerName" = "usei01" ]|| ["$ServerName" = "usei02" ]|| ["$ServerName" = "usei03" ]);then

;then should be in one line

Last edited by millan; 07-01-2013 at 05:22 AM.. Reason: added brackets
This User Gave Thanks to millan For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

read inside a while loop

Hi all, In a while loop, like below... while read line do read choice case $choice in 1) echo "xxx" esac done < file why I can't run the read choice???? (3 Replies)
Discussion started by: dta4316
3 Replies

2. Shell Programming and Scripting

variable inside variable inside loop headache

Hi Gurus I have a file called /tmp/CMDB which looks like this serial: 0623AN1208 hostname: server1 model: x4100 assetID: 1234 I am writing a for loop that will go through this file line by line creating a variable of itself. Using the first iteration of the loop (i.e. the first line) as... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

3. Shell Programming and Scripting

Using variables created sequentially in a loop while still inside of the loop [bash]

I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends. As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

4. UNIX for Dummies Questions & Answers

SED inside while loop

Hi, im having problem creating a loop using my code: aside from the fact that the 1st variable (VAR) does not increment, it loops more than the expected output. for sample purposes, test csv contains 3 lines. #get number of lines in the file lines=$( wc -l < test.csv ) ... (5 Replies)
Discussion started by: paoie
5 Replies

5. Shell Programming and Scripting

ssh inside a for loop

Hi, The requirement is to ssh to unix servers and oracle databases, to perform some monitoring activity. I'm using shell script to perfom this. I pass the server details and database to a variable ... SERVERS="SERVER1 SERVER2 SERVER3" DATABASE="DB1 DB2 DB3" for i in $SERVERS do ssh... (2 Replies)
Discussion started by: senthil3d
2 Replies

6. Shell Programming and Scripting

Using 'su' inside a loop

Hi, I am using su within a for loop. As you might expect, it prompts for password during each loop execution. Here is my piece of code: for i in $LIST do if then DATABASE=`echo $i | awk -F "|" '{ print $1 }'` USER_ID=`echo $i | awk -F "|" '{ print $2 }'` su - apstage -c... (1 Reply)
Discussion started by: sugan
1 Replies

7. Shell Programming and Scripting

BASH loop inside a loop question

Hi all Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies

8. AIX

Need help on for loop inside ssh

Hi, I am having a file like, #cat file Jun 19 13:08 Jun 19 13:08 Jun 19 13:08 Jun 19 13:14 when I run the below comamnd locally it will work fine, IFS=$'\n'; for i in $(cat file) ;do echo "HI $i" ; done And the output is, HI Jun 19 13:08 HI Jun 19 13:08 HI Jun 19 13:08 HI... (1 Reply)
Discussion started by: sumanthupar
1 Replies

9. UNIX for Dummies Questions & Answers

Write a while loop inside for loop?

I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off.... I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
Discussion started by: xxhieixx
3 Replies

10. Shell Programming and Scripting

Use xmlstarlet inside an if loop

I have a XML file of little huge size. I have to build a logic to get the count of the tag <capacity>. And have an if loop such that all the <capacity> blocks are captured one after the other. sample input file - sample1.xml <subcolumns><capacity><name>45.90</name> <index>0</index>... (1 Reply)
Discussion started by: ramprabhum
1 Replies
client.conf(5)							    Apple Inc.							    client.conf(5)

NAME
client.conf - client configuration file for cups DESCRIPTION
The client.conf file configures the CUPS client and is normally located in the /etc/cups and/or ~/.cups directories. Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character. Note: Starting with macOS 10.7, this file is only used by command-line and X11 applications plus the IPP backend. The ServerName directive is not supported on macOS at all. Starting with macOS 10.12, all applications can access these settings in the /Library/Prefer- ences/org.cups.PrintingPrefs.plist file instead. See the NOTES section below for more information. DIRECTIVES The following directives are understood by the client. Consult the online help for detailed descriptions: AllowAnyRoot Yes AllowAnyRoot No Specifies whether to allow TLS with certificates that have not been signed by a trusted Certificate Authority. The default is "Yes". AllowExpiredCerts Yes AllowExpiredCerts No Specifies whether to allow TLS with expired certificates. The default is "No". Encryption IfRequested Encryption Never Encryption Required Specifies the level of encryption that should be used. GSSServiceName name Specifies the Kerberos service name that is used for authentication, typically "host", "http", or "ipp". CUPS adds the remote host- name ("name@server.example.com") for you. The default name is "http". ServerName hostname-or-ip-address[:port] ServerName /domain/socket Specifies the address and optionally the port to use when connecting to the server. Note: This directive is not supported on macOS 10.7 or later. ServerName hostname-or-ip-address[:port]/version=1.1 Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier. SSLOptions [AllowDH] [AllowRC4] [AllowSSL3] [DenyCBC] [DenyTLS1.0] SSLOptions None Sets encryption options (only in /etc/cups/client.conf). By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites. Security is reduced when Allow options are used. Security is enhanced when Deny options are used. The AllowDH option enables cipher suites using plain Diffie-Hellman key negotiation (not supported on systems using GNU TLS). The AllowRC4 option enables the 128-bit RC4 cipher suites, which are required for some older clients. The AllowSSL3 option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0. The DenyCBC option disables all CBC cipher suites. The DenyTLS1.0 option disables TLS v1.0 support - this sets the minimum protocol version to TLS v1.1. TrustOnFirstUse Yes TrustOnFirstUse No Specifies whether to trust new TLS certificates by default. The default is "Yes". User name Specifies the default user name to use for requests. ValidateCerts Yes ValidateCerts No Specifies whether to only allow TLS with certificates whose common name matches the hostname. The default is "No". NOTES
The client.conf file is deprecated on macOS and will no longer be supported in a future version of CUPS. Configuration settings can instead be viewed or changed using the defaults(1) command: defaults write /Library/Preferences/org.cups.PrintingPrefs.plist Encryption Required defaults write /Library/Preferences/org.cups.PrintingPrefs.plist TrustOnFirstUse -bool NO defaults read /Library/Preferences/org.cups.PrintingPrefs.plist Encryption On Linux and other systems using GNU TLS, the /etc/cups/ssl/site.crl file, if present, provides a list of revoked X.509 certificates and is used when validating certificates. SEE ALSO
cups(1), default(1), CUPS Online Help (http://localhost:631/help) COPYRIGHT
Copyright (C) 2007-2017 by Apple Inc. 19 October 2017 CUPS client.conf(5)
All times are GMT -4. The time now is 01:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy