Posted on 29 Avr, 2014 in Commandes, Linux, Scripts |
Commande: comparer deux fichiers
[code language="shell"]if</span><span class="pln"> cmp </span><span class="pun">-</span><span class="pln">s </span><span class="str">"$fichier1"</span><span class="str">"$fichier2";</span><span class="kwd">then</span><span class="pln">
echo </span><span class="str">"Les fichiers sont identiques"
</span><span class="kwd">else</span><span class="pln">
echo </span><span class="str">"The files are different"
</span><span class="kwd">fi[/code]