Probleme avec une declaration de variable

Résolu
ogranyanos Messages postés 18 Date d'inscription   Statut Membre Dernière intervention   -  
ogranyanos Messages postés 18 Date d'inscription   Statut Membre Dernière intervention   -
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

zipe31 Messages postés 36402 Date d'inscription   Statut Contributeur Dernière intervention   6 431
 
Salut,

VAR="$(commande)"

Autrement dit :
c="$(echo PI-TUX-TUX100P-RDG00R00C00.SIG | awk -F - '{ print $3}' | tr [A-Z] " " | awk '{ print $1}')"
2
ogranyanos Messages postés 18 Date d'inscription   Statut Membre Dernière intervention  
 
thanks a lot !!
0