AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  Select data from log

    Posted 06/05/13 09:25 PM

    Originally posted by: meomeomeo87


    Hi all,

    I have the log file.

    (13:55:54:39878 ) : Send : [A]Login [34=0SOH2=KTSSKSOH49=NEWTUOMMSOH333=NHHHHH]
    (13:55:55:15228 ) : Send : [A]Login[34=0SOH2=KTSSKSOH49=NEtrtrtrttrttrSOH333=Nggrgrg]
    (13:55:56:37778 ) : Send : [A]Login[34=0SOH2=KTSSKSOH49=trtrtrtrtrrtttMSOH333=N545455]
    (13:55:57:33338 ) : Send : [A]Login[34=0SOH2=KTSSKSOH49=NE54ghthtMMSOH333=N444444]
    I want to get this data (tab time and tab 49)
    (13:55:54:39878 )SOHNEWTUOMM
    (13:55:55:15228 )SOHNEtrtrtrttrttr
    (13:55:56:37778 )SOHtrtrtrtrtrrtttM
    (13:55:57:33338 )SOHNE54ghthtMM
    How to do that? what command ?
    TKS


    #AIX-Forum


  • 2.  Re: Select data from log

    Posted 06/24/13 12:41 PM

    Originally posted by: GarlandJoseph


    This looks like a simple parsing issue that can be solved with either awk or cut.  I cut and pasted your text and was going to parse it however, the organization of the data you posted is unclear.  For example, I don't think the above output shows the actual end of lines.  When I cut and pasted it even appeared that a portion of the lines are fixed...with the last field being variable.  Please attach a sample of the actual log file using the attach a file feature provided by this forum.

     


    #AIX-Forum