Working on the *pipe prisoner*'s headache this 
for the purpose works:


local mypath="/home"
local myfile="file.txt"
local arg
let y=0
local line 

for line in $( < $mypath'/'$myfile )
do
    echo "line = $line"
   
    arg[$y]=${line}

    let y=$y+1
done

echo "line1 = ${arg[0]}"
echo "line2 = ${arg[1]}"
echo "line3 = ${arg[2]}"


An other wondering you need to check its portability.. :)


Dan

------
Blog: https://bsd.gaoxio.com - Repo: https://code.5mode.com

Please reply to the mailing-list, leveraging technical stuff.

Reply via email to