Sponsored Content
Full Discussion: Variable logic clarification
Top Forums Shell Programming and Scripting Variable logic clarification Post 302974053 by vamsi.valiveti on Wednesday 25th of May 2016 07:07:14 AM
Old 05-25-2016
Variable logic clarification

I have one script which consists of variables number of parameter and stuckup with following logic

case:1
script:
parameteres are
username,password,P1=v1,P2=v2,P3=v3

case:2
script:
parameteres are
username,password,P1=v1,P2=v2,P3=v3,P4=v4

i will pass username,password for all the script and no of parameters after that is not fixed.It may be 3 or 4 or 5 etc

I want to store rest of parameters in a variable except username and password.

case:1 output

v=-param P1=v1 -param P2=v2 -param P3=v3


case:2 output

v=-param P1=v1 -param P2=v2 -param P3=v3 -param P4=v4
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Missing Assigned Variable within logic operator

Hey , I'm trying to perform the following command, however it cannot read the variable assigned earlier. I'm not sure why this happen. Please help thanks while : do echo "what's ur name? (if none just press )" read name changeName = echo $name | sed "s/on/ey/" echo $changeName #this... (8 Replies)
Discussion started by: sexyTrojan
8 Replies

2. Shell Programming and Scripting

Variable clarification

what is the significance of %%.ksh in processname and %.ksh in processname_1 variable? Why is it returning same value?How is it working? processname=Testabc export processname=${processname%%.ksh} echo $processname #It is returning Testabc export processname_1=${processname%.ksh} echo... (2 Replies)
Discussion started by: vamsi.valiveti
2 Replies
fence_baytech(8)					      System Manager's Manual						  fence_baytech(8)

NAME
fence_baytech - I/O Fencing agent for Baytech RPC switches in combination with a Cyclades Terminal Server SYNOPSIS
fence_baytech [OPTION]... DESCRIPTION
This fencing agent is written for the Baytech RPC27-20nc in combination with a Cyclades terminal server. The Cyclades TS exports the RPC's serial port via a Telnet interface. Other interfaces, such as SSH, are possible. However, this script relies upon the assumption that Telnet is used. Future features to this agent would allow the agent to work with a multitude of different communication protocols such as Telnet, SSH or Kermit. The other assumption that is made is that Outlet names do not end in space. The name "Foo" and "Foo " are identical when the RPC prints them with the status command. fence_baytech accepts options on the command line as well as from stdin. fenced sends parameters through stdin when it execs the agent. fence_baytech can be run by itself with command line options which is useful for testing. Vendor URL: http://www.baytech.net OPTIONS
-a host IP address or hostname to connect to. -h Print out a help message describing available options, then exit. -l login Username name for the switch. -n port The name of the outlet to act upon. -o action The action required. This can be on, off, status or reboot (default) -p password Password for login. -S path Full path to an executable to generate the password for login. -q Quiet mode: print only error messages. -V Print out a version message, then exit. STDIN PARAMETERS
agent = < param > This option is used by fence_node(8) and is ignored by fence_baytech. host = < hostname | ip > IP address or hostname to connect to. login = < param > Login name. action = < param > The action required. This can be on, off, status or reboot (default) passwd = < param > Password for login. passwd_script = < param > Full path to an executable to generate the password for login. outlet = < param > The name of the outlet to act upon. SEE ALSO
fence(8), fence_node(8) fence_baytech(8)
All times are GMT -4. The time now is 12:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy