#!/bin/bash
FILENAME="index.html"
echo "
" > $FILENAME
lien='- ${np}
'
OLDIFS=$IFS
IFS=","
while read nom prenom
do
echo "Création de $prenom $nom"
id="${prenom:0:1}${nom}"
id=${id,,}
#sed_id='s/${id}/'$id'/'
#sed_np='s/${np}/'$nom $prenom'/'
#echo $lien | sed -e $sed_id -e $sed_np >> $FILENAME
ligne=${lien//{id}/$id}
echo $ligne
done < $1
echo "
" >> $FILENAME
IFS=$OLDIFS