[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: [HS] awk



Bonjour à tous,

En fait c'est tout simple :
echo 1 2 3 4 5 | awk '{ for(i=1; i<=$NF; i++) if (i > 2) print $i }'

affichera :
3
4
5
6

Il ne reste qu'à voir comment metre ces champs sur une seule ligne...

-----Original Message-----
From: Alexandre [mailto:neonoe123321@gmail.com] 
Sent: jeudi 24 juillet 2008 08:17
To: debian-user-french@lists.debian.org
Subject: Re: [HS] awk

Le mercredi 23 juillet de l'année 2008, vers 15 heures et 40 minutes, DUFRESNE, Matthias (STERIA) écrivait:
> Bonjour à tous,
Bonjour,

> 
> Je cherche à savoir s'il n'existerait pas une astuce pour que awk affiche « la
> fin de la ligne après l'élément $n ».

pas sûr que ce soit ça mais sait-on jamais, si ça peut aider:

#!/bin/awk -f
{ print $NF; }


?
-- 
---()()()----()()()----()()()--)()()(----)()()(----)()()(---
-()----()--()-()-----()----()--)(----)(-----)(-)(--)(----)(-
()----()----()()()----()()()----)()()(----)()()(----)(----)(

-- 



The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.


Reply to: