Hi
Hopefully someone can help. I have a file with values written to by a number of other scripts and I wan to be able to automatically add each line in the file to a separate array value. I have tried the following but it does not work:
cat $DIRTEMP$PIDFILE | while read LINE #read each line in the file
set -A array # null out previous arrays
do
arr[$ARR] = $LINE
echo $LINE
echo ${arr[$ARR]}
$ARR = $ARR + 1
done
Any one suggest how this can be done.
Thanks
Phil.
Hopefully someone can help. I have a file with values written to by a number of other scripts and I wan to be able to automatically add each line in the file to a separate array value. I have tried the following but it does not work:
cat $DIRTEMP$PIDFILE | while read LINE #read each line in the file
set -A array # null out previous arrays
do
arr[$ARR] = $LINE
echo $LINE
echo ${arr[$ARR]}
$ARR = $ARR + 1
done
Any one suggest how this can be done.
Thanks
Phil.