bash : plus d'echo sur la ligne
Par Bernard le mardi 1 septembre 2009, 16:46 - Lien permanent
Si ca te semble bizarre d'avoir a faire afficher une variable pour la passer a un programme, ce billet est fait pour toi.
Le man bash est formel :
Here Strings: A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input
ce qui veut dire que la forme :
echo $VAR | grep motif
peut etre subsituee par :
grep motif <<<$VAR
ca change la vie hein.