Variable expression and while

hi,

i'm reading a file "LISTE_FILE" like :

#
$LOGCOM * 5 
$PRCCOM * 10

and i want to use the file with "while" and having the fields splitted into new variables for treatment :

while read LINE
  do
    # Ignorer les commentaires un # en premiere position 
    if [ "`echo $LINE|cut -c1`" = "#" ]
    then
	continue
    fi  	

    
    set `echo $LINE`

    REP_PERE=$1
    SELECT=$2
    NB_JOUR=$3

    
  done < $LISTE_FILE

but obviously the 1st field $1 needs to be interpreted ,
LOGCOM is charged running the main script.

At this time i have already REP_PERE="$LOGCOM"
I tried with expr and eval without success.

can you help me please?
Christian:D

Do you need the complete line in a variable? If not you can have read do the split:

#!/bin/bash
while read REP_PERE SELECT NB_JOUR
do
   if [ "${REP_PERE:0:1}" = "#" ]; then
      continue
   fi
   echo "REP_PERE: $REP_PERE"
   echo "SELECT: $SELECT"
   echo "NB_JOUR: $NB_JOUR"
done <LISTE_FILE

Well the code is ok except that the original value of the input file :
$LOGCOM * 5

is not translated
we should have the original value of LOGCOM in the variable REP_PERE

this script is running on differents user accounts
exemple : user01 ; user02
and LOGCOM=/user01 or /user02 and so on
and REP_PERE should equal "/user01" for example

regards
Christian

To make things clear for me: You got a main script that sets the value of the variable LOGCOM and exports it, then the script you posted is called which reads the textfile and gets the variable name. You wish to assign the value of the read variable to REP_PERE.
Try REP_PERE=`eval echo $1` in your original script.