bug-gnu-utils
[Top][All Lists]
Advanced

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

Bug in awk


From: omprakaashveroy . balasubramanian
Subject: Bug in awk
Date: Thu, 24 Aug 2006 15:45:44 +0530

Hi,
Please see the attached text file. It has 5 fields delimited by commas.

The following command 
 awk ' BEGIN { FS="," } {a=index($4,"e"); printf 
"%s\n",substr($4,a-13,a+13) } ' active.txt 
should give me an output like shown below

8TM22N30OGK1QeAV717RFPJG1BG
BLG2MAHEFE0T0eBNV9FGBMUTQK9
C5FI84N0NAVACe5ASR0FJBRI70I
B3L18INGH1743e1OOPIPKIOJVSE
FVK6PJM0546E4eAD211EO7BC8KE

but it gives output like this with ~GM~M2 in addition to what is expected

8TM22N30OGK1QeAV717RFPJG1BG~GM~M2
BLG2MAHEFE0T0eBNV9FGBMUTQK9~GM~M2
C5FI84N0NAVACe5ASR0FJBRI70I~GM~M2
B3L18INGH1743e1OOPIPKIOJVSE~GM~M2
FVK6PJM0546E4eAD211EO7BC8KE~GM~M2

Please let us know why ?? 
NOTE : We are working on Linux 2.4.21-138-8SP3



Thanks & Best Regards
Omprakaashve Roy Balasubramanian
Tata Consultancy Services Limited
Mailto: address@hidden
Website: http://www.tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Attachment: active.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]