Dear all,
i m unable to give array decalartion in solaris Operating system shell script
and script was so.sh
declare -a bull
for i in 1 2 3 4 5 6 7 8 9
do
bull=$i
echo "${bull}"
done
it is throwing an error called
so.sh: declare: not found
so.sh: bull=1: not... (20 Replies)
Hi,
I want to check a particular string inserted by User to be checked against the values i already have in a ARRAY string using IF condition. Is this possible? if yes how to do that.
example :
i have a,b,c,d,e,f values in a array called values
i asked user to enter a value:
user entered... (2 Replies)
this is my code
declare -a USERCERT
declare -a CACERT
declare -a KEYSRC
this is the error
+ declare -a USERCERT
./clone.sh: 1: declare: not found
+ declare -a CACERT
./clone.sh: 1: declare: not found
+ declare -a KEYSRC
./clone.sh: 1: declare: not found (11 Replies)
I want to create a shell script for a menu selection consisting of users defined on the machine. To an administrator having the privileges, the selection menu will look as follows:
Select the user you want to define the variables for:
1) my-username-1
2) my-username-2
etc
Then there would be a... (7 Replies)
hi team,
i have a file, which contains only variable and its value
param.ksh
---------
export A=123
export B=345
export C=567
export D=OPLI
export E=OL89PO
From shell script, i am invoking this file and use the value of this variable. Now there are 5 variable in above file. Before i... (1 Reply)
In shell script i have two variables with value
debit_sal="DOG,HIU,JIU,GYT,PPI,KIU,HUY........."
debit_req='HIU, JIU, HUY, GTR, KOI, ............"
i stored this two in two array
arr=$(echo $debit_sal| tr "," "\n");
arr1=$(echo $debit_req| tr ", " "\n"); #(note second arry has comma with... (5 Replies)
Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this
set args = ( city state country price )
I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to... (2 Replies)
Hi Experts,
I've got this problem where I need to add two array in shell script such that that is an element is greater than 9 then it get further split into individual digit, something like below :
Input :-
array1=(2 6 8 9 10 12)
array2=(5 4 6 8 12 14)
Output :-
array3=(7 1 0 1 4 1 7 2 2... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m10_003
CheckDigits::M10_003(3pm) User Contributed Perl Documentation CheckDigits::M10_003(3pm)NAME
CheckDigits::M10_003 - compute check digits for ISMN
SYNOPSIS
use Algorithm::CheckDigits;
$ismn = CheckDigits('ismn');
if ($ismn->is_valid('M-345-24680-5')) {
# do something
}
$cn = $ismn->complete('M-345-24680');
# $cn = 'M-345-24680-5'
$cd = $ismn->checkdigit('M-345-24680-5');
# $cd = '5'
$bn = $ismn->basenumber('M-345-24680-5');
# $bn = 'M-345-24680'
DESCRIPTION
ALGORITHM
1. The 'M' as the first number gets the value 3. Beginning left all numbers are weighted alternatively 3 and 1.
2. The sum of all products is computed.
3. The sum of step 3 ist taken modulo 10.
4. The check digit is the difference between 10 and the number from step 3 taken modulo 10.
METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given
above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and concatenated to the end of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the checkdigit of $number if $number has a valid check digit.
Return '' otherwise.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de.
perl v5.10.0 2008-05-17 CheckDigits::M10_003(3pm)