|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hola , tengo un archivo de texto con 5 campos los cuales tiene en el segundo campo duplicado varios movientos con diferentes fechas y horas. id num fecha hora valor3 Code:
1 2222 10/12/09 10:01 1000 2 2222 11/12/09 11:04 3000 3 4556 09/12/08 12:22 1900 4 4556 12/12/09 11:00 2900 5 1111 17/03/10 10:00 1100 Necesitaria un nuevo archivo el cual me registre el num y el moviento mas reciente con la fecha y la hora. Gracias. Last edited by Yogesh Sawant; 12-16-2009 at 04:42 AM.. Reason: added code tags |
| Sponsored Links | ||
|
|
|
#2
|
||||
|
||||
|
Hello.
Per our forum rules, all posts must be in English. We do provide translation services for posts from English to a number of languages as a benefit to users. However, posts must be in English. Please repost in English. Thank you for your cooperation. The UNIX and Linux Forums. |
|
#3
|
||||
|
||||
|
Try: Code:
awk '{ A[$2]=$0; }END { for (e in A) print A[e] }' file |
|
#4
|
|||
|
|||
|
ok dennis , thank you . i try for next question , write in english .
regard |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|