• [^] # Re: bash vs. sh ?

    Posté par . En réponse au message Conky et condition (if). Évalué à 1.

    ${execp if [[ "1" = "1" ]]; then echo "plop";else echo "not good"; fi }
    

    ===> Affiche not good.

    En suivant les moteurs de recherches j'ai aussi testé avec if_match comme expliqué ici : https://stackoverflow.com/questions/15692990/conky-with-if-match-and-and
    Mais cela ne fonctionne pas (le conky ne s'affiche même plus).

    ${execp certSecure=$( openssl s_client -connect 88.191.250.176:443 -servername linuxfr.org < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin ) }
    ${execp certTor=$( torsocks openssl s_client -connect linuxfr.org:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin ) }
    ${if_match "$certSecure"=="$certTor" }${execp echo '${color green}';echo "$certTor";echo '${color}'; }${else}{$execp echo '${color red}';echo "$certSecure"; echo "$certTor";echo '${color}'; }${endif}