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

Comments

Devi.Angularjs said…
This comment has been removed by a blog administrator.
Devi.Angularjs said…
This comment has been removed by a blog administrator.

Popular posts from this blog

How to set or disable auto-logout on bash shell

Setting up updates with public yum server for Oracle Enterprise Linux

Setting Filezilla Server on Amazon EC2 instance with passive ftp