Answers for "passing variables into array"

0

passing variables into array

resnuml=`cat h2.pdb | awk '{print $5}' | uniq` # get uniq pattern like 
echo resnuml : 10 11 12 13 14 15

Aresnum=( $resnuml ) # assing above avlues into array

echo length : ${#Aresnum[@]}   # Array length. = 6
echo resnums :  ${Aresnum[@]}   # = 10 11 12 13 14 15
echo resnum 0:  ${Aresnum[0]}  # = 10
Posted by: Guest on August-21-2021
0

passing variables into array

resnuml=`cat h2.pdb | awk '{print $5}' | uniq` # get uniq pattern like 
echo resnuml : 10 11 12 13 14 15

Aresnum=( $resnuml ) # assing above avlues into array

echo length : ${#Aresnum[@]}   # Array length. = 6
echo resnums :  ${Aresnum[@]}   # = 10 11 12 13 14 15
echo resnum 0:  ${Aresnum[0]}  # = 10
Posted by: Guest on August-21-2021

Code answers related to "passing variables into array"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language