Commande awk

Résolu/Fermé
Ka-El Messages postés 260 Date d'inscription lundi 28 novembre 2011 Statut Membre Dernière intervention 7 août 2020 - 28 nov. 2011 à 16:00
Ka-El Messages postés 260 Date d'inscription lundi 28 novembre 2011 Statut Membre Dernière intervention 7 août 2020 - 28 nov. 2011 à 16:13
Bonjour,

Suivant la commande et son résultat :
> pelmon -Identity
Object: Gateway pelmon
Copyright: Axway Software 2001-2010
Product version: 6.11.4 SP 14
Tag: gateway-6_11_4-m-8-42

Je dois créer l'information suivante dans un variable :
6.11.4.14

Pour l'instant j'arrive à ce résultat :
pelmon -Identity | sed -n "3p" | awk '{print $3}'
6.11.4

Mais je n'arrive pas à obtenir ce résultat définitif :
6.11.4.14

Est-ce que vous pourriez m'apportez votre aide ?

2 réponses

zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 407
28 nov. 2011 à 16:06
Salut,

awk '/Product/ { print $3"."$5 }' fichier

;-))
0
Ka-El Messages postés 260 Date d'inscription lundi 28 novembre 2011 Statut Membre Dernière intervention 7 août 2020
28 nov. 2011 à 16:13
Nickel !
Encore merci Zipe31.
Grace à toi j'ai pu fournir un travail productif (c'est ma société qui va être contente)
0