Hi!<br><br>   Is there any other method to transform lines of a file to an array variable <span id="result_box" class=""><span style="" title="">than these bellow? <br></span></span><br>
### MY FILE CONTENT ####<br><span id="result_box" class=""><span style="" title=""># cat file<br>[SERVER1]<br>IP=0.0.0.0<br></span></span><span id="result_box" class=""><span style="" title="">[SERVER2]<br>
IP=0.0.0.0<br>
</span></span><br>### METHOD 1 ####<br><span id="result_box" class=""><span style="" title=""># CONF=( $(cat file) )</span></span><br><span id="result_box" class=""><span style="" title=""><br></span></span>### METHOD 2 ####<br>
<span id="result_box" class=""><span style="" title=""># CONF=( $(&lt;file) )</span></span><br clear="all"><br>    If I execute these two methods on GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu) (bash-3.0-31.el4.i386.rpm), IŽll give this result in array:<br>
<br># echo ${CONF[*]}<br>1 IP=0.0.0.0 [SERVER2] IP=0.0.0.0<br><br>    If I execute these two methods on GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu) (bash-3.1-16.1.el5.i386.rpm), IŽll give this result in array:<br>
<br># echo ${CONF[*]}<br>[SERVER01] IP=0.0.0.0 [SERVER02] IP=0.0.0.0<br><br><br>See the diference? The version 3.00.16 replace the string [SERVER1] by 1, and the version 3.1.17 do nothing.<br><br>Why??!! This is a BUG?<br>
<br>-- <br>Att.<br>Bruno Galindro da Costa<br><a href="mailto:bruno.galindro@gmail.com">bruno.galindro@gmail.com</a><br>