Sponsored Content
Full Discussion: If inside If loop
Top Forums Shell Programming and Scripting If inside If loop Post 302827887 by Klashxx on Monday 1st of July 2013 04:46:31 AM
Old 07-01-2013
Or:
Code:
 if [ "$ServerName" = "usei01" -o "$ServerName" = "usei02" -o "$ServerName" = "usei03" ]

This User Gave Thanks to Klashxx 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
CPASSWD(1)						    BSD General Commands Manual 						CPASSWD(1)

NAME
cpasswd -- scramble passwords for csup authentication SYNOPSIS
cpasswd clientName serverName DESCRIPTION
The cpasswd utility creates scrambled passwords for the CVSup server's authentication database. It is invoked with a client name and a server name. ClientName is the name the client uses to gain access to the server. By convention, e-mail addresses are used for all client names, e.g., 'BillyJoe@FreeBSD.org'. Client names are case-insensitive. ServerName is the name of the CVSup server which the client wishes to access. By convention, it is the canonical fully-qualified domain name of the server, e.g., 'CVSup.FreeBSD.ORG'. This must agree with the server's own idea of its name. The name is case-insensitive. To set up authentication for a given server, one must perform the following steps: 1. Obtain the official serverName from the administrator of the server or from some other source. 2. Choose an appropriate clientName. It should be in the form of a valid e-mail address, to make it easy for the server administrator to contact the user if necessary. 3. Choose an arbitrary secret password. 4. Run cpasswd, and type in the password when prompted for it. The utility will print out a line to send to the server administrator, and instruct you how to modify your $HOME/.csup/auth file. You should use a secure channel to send the line to the server administrator. Since $HOME/.csup/auth contains passwords, you should ensure that it is not readable by anyone except yourself. FILES
$HOME/.csup/auth Authentication password file. SEE ALSO
csup(1), cvsup(1), cvsupd(8). http://www.cvsup.org/ AUTHORS
Petar Zhivkov Petrov <pesho.petrov@gmail.com> is the author of cpasswd, the rewrite of cvpasswd. John Polstra <jdp@polstra.com> is the author of CVSup. LEGALITIES
CVSup is a registered trademark of John D. Polstra. FreeBSD June 27, 2007 FreeBSD
All times are GMT -4. The time now is 08:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy