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
Mixin::ExtraFields::Param(3pm)				User Contributed Perl Documentation			    Mixin::ExtraFields::Param(3pm)

NAME
Mixin::ExtraFields::Param - make your class provide a familiar "param" method VERSION
version 0.011 $Id: /my/cs/projects/Mixin-ExtraFields-Param/trunk/lib/Mixin/ExtraFields/Param.pm 29059 2006-12-11T03:20:29.045283Z rjbs $ SYNOPSIS
package Widget::Parametric; use Mixin::ExtraFields::Param -fields => { driver => 'HashGuts' };; ... my $widget = Widget::Parametric->new({ flavor => 'vanilla' }); printf "%s: %s ", $_, $widget->param($_) for $widget->param; DESCRIPTION
This module mixes in to your class to provide a "param" method like the ones provided by CGI, CGI::Application, and other classes. It uses Mixin::ExtraFields, which means it can use any Mixin::ExtraFields driver to store your data. By default, the methods provided are: o param o exists_param o delete_param These methods are imported by the "fields" group, which must be requested. If a "moniker" argument is supplied, the moniker is used instead of "param". For more information, see Mixin::ExtraFields. METHODS
param my @params = $object->param; # get names of existing params my $value = $object->param('name'); # get value of a param my $value = $object->param(name => $value); # set a param's value my @values = $object->param(n1 => $v1, n2 => $v2, ...); # set many values This method sets or retrieves parameters. AUTHOR
Ricardo SIGNES, "<rjbs@cpan.org>" BUGS
Please report any bugs or feature requests to <http://rt.cpan.org>, for Mixin-ExtraFields-Param. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. COPYRIGHT
Copyright 2005-2006 Ricardo Signes, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2006-12-11 Mixin::ExtraFields::Param(3pm)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy