Le 14 mars 10 à 19:18, Yves Petronin a écrit :
>
> Pour mieux illustrer
soit $ficA $ficB et $ficC les fichiers :
Une manière simple (sans chercher à être efficace) :
cat $ficA |while read line
do
RECHERCHE=$(echo $line |cut -f1 -d\;)
RESULT=$(grep "^${RECHERCHE};" $ficB | cut -f2 -d\;)
if [ -z "$RESULT" ]
then
echo $line |cut -f2 -d\;
else
echo $RESULT
fi
done >$ficC
Ca devrait être déjà beaucoup plus rapide qu'un AppleScript...
--
Jayce Piel
MosX.org
la renaissance.....
_______________________________________________
archives :
http://listes.patpro.net/list/sshfr.fr.html
http://listes.patpro.net/mailman/listinfo/script_shell_fr