Probleme avec une declaration de variable

Résolu
Bonjour,

mon problem est que la commande passe bien ( c est censé m afficher 100)

[root@nopfb022 VDKJ2614]# echo PI-TUX-TUX100P-RDG00R00C00.SIG | awk -F - '{ print $3}' | tr [A-Z] " " | awk '{ print $1}'
100

mais quand je la declare en variable ca plante

[root@nopfb022 VDKJ2614]# c=echo PI-TUX-TUX100P-RDG00R00C00.SIG | awk -F - '{ print $3}' | tr [A-Z] " " | awk '{ print $1}'
-bash: PI-TUX-TUX100P-RDG00R00C00.SIG: command not found

2 réponses

  1. Contributeur
    Salut,

    VAR="$(commande)"

    Autrement dit :
    c="$(echo PI-TUX-TUX100P-RDG00R00C00.SIG | awk -F - '{ print $3}' | tr [A-Z] " " | awk '{ print $1}')"
    2