Posts

Showing posts from December, 2006

double loop script example

#!/bin/bash i=0 for ID1 in $(awk -F":" '{print $2}' /tmp/components) ; do id1[$i]=$ID1 i=$(($i+1)) done j=0 ; while [ $j -lt $i ] ; do cmvt_component_os=${id1[$j]}; echo $cmvt_component_os ; j=$(($j+1)) ; done