Bash Redirecting Input from Multiple Files

Read data from two files. In this case one file with ctid’s (openvz ve numbers). And one file with ip addresses.


exec 7<$1 8<$2

    while read f1 <&7 && read f2 <&8
      vzctl set $f1 --ipadd $f2 --save

Leave a Reply

Your email address will not be published. Required fields are marked *