Une commande unique ou un script complet irait? Pour un script :
xarli@tiki:/tmp$ cat test.sh
exec < file1
while read ligne
do
grep $ligne file2
done
xarli@tiki:/tmp$ sh test.sh
dsdssd sfdsdfsd toto
qsdfqsdftoto toto qsqsf
sisi qsfsdfsdf
dfsdfs nono qdqsd
xarli@tiki:/tmp$
# script?
Posté par Xarli . En réponse au message Recherche de motifs via un fichier. Évalué à 1.
xarli@tiki:/tmp$ cat test.shexec < file1
while read ligne
do
grep $ligne file2
done
xarli@tiki:/tmp$ sh test.sh
dsdssd sfdsdfsd toto
qsdfqsdftoto toto qsqsf
sisi qsfsdfsdf
dfsdfs nono qdqsd
xarli@tiki:/tmp$