Here is last part of python script, where i am printing following values.
for i in data:
print i[2], '|', i[12], '\t|', i[24].split('@')[-1], '\t|' , i[9]
Output:
[root@tux work]# ./fs.py
2015-04-24 11:53:31 | RINGING | N/A | 15035205973
2015-04-24 11:53:31 | DOWN | N/A | 00100017063156582
2015-04-24 11:53:33 | RINGING | N/A | 19516828036
2015-04-24 11:53:00 | ACTIVE | 72.xx.xx.120 | 19093929436
2015-04-24 11:53:05 | ACTIVE | 72.xx.xx.120 | 13372528024
I am trying to implement color text
printing using above table status column RINGING
, ACTIVE
, DOWN
i[12]
holding status column
if RINGING = 'Yellow'
if ACTIVE = 'Green'
if DOWN = 'Red'
I found following post which is really good but don't know how it will fit in for
loop