Problem I&#39;m able to understand:<br>Suppose I have<br>$NUMDISKS that can be 1 or 2 ... or n<br>and<br>$DISKS that can be<br>sda, or <br>sda sdb<br>or sda sdb sdc<br>(so a string with the didks separated by space)<br>I want to assign <br>
<br>DRIVE1=sda<br>DRIVE2=sdb<br>...<br>DRIVEN=sdn<br><br>if I script<br><br>for i in $(seq 1 $NUMDISKS)<br>do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DRIVE${i}=&quot;$(echo $DISKS | cut -d &#39; &#39; -f ${i})&quot;<br>done<br><br>I get this error through assignment:<br>
<br>DRIVE1=sda: command not found<br><br>Instead if the disk env variable is cciss/c0d0 I get<br>DRIVE1=cciss/c0d0: No such file or directory<br><br>Any glue to the cause??? And to succeed to do the dynamic assignment?<br>
<br>Thanks,<br>Gianluca<br><br>