Search Results

Search: Posts Made By: Arai
30,507
Posted By aigles
The syntax isn't the same between bash and ksh : ...
The syntax isn't the same between bash and ksh :

#!/usr/bin/bash

declare -a mon
mon=( Jan Feb Mar Apr )

echo ${#mon }
echo ${mon[2]}
#!/usr/bin/ksh

set -A mon -- Jan Feb Mar Apr
...
3,737
Posted By cfajohnson
cmlist01=( a b c d e) cmlist02=( f g h i ) ...
cmlist01=( a b c d e)
cmlist02=( f g h i )
cmlist03=( j k l )

for listnbr in cmlist01 cmlist02 cmlist03
do
eval "printf 'There are %d items in %s:\n' \"\${#${listnbr}[@]}\" \"$listnbr\""
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy