Re: [Tutor] how to grep a word and make a dictionary from multiple lines.

2016-01-05 Thread David Rock
* Fosiul Alam [2016-01-05 09:46]: > Hi > so the logic will be like bellow :- > > a)Start to read the file, > b)start a line which start with "3600601" > c) Iterate through the line till i see another line which starts with > "3600601" > d) read the last line before 3600601 > e)cut all the path a

Re: [Tutor] how to grep a word and make a dictionary from multiple lines.

2016-01-05 Thread Fosiul Alam
Hi so the logic will be like bellow :- a)Start to read the file, b)start a line which start with "3600601" c) Iterate through the line till i see another line which starts with "3600601" d) read the last line before 3600601 e)cut all the path and create a dictionary which will have one key (LUN I

Re: [Tutor] how to grep a word and make a dictionary from multiple lines.

2016-01-04 Thread David Rock
* Fosiul Alam [2016-01-04 22:29]: > Hi Expert, > I am learning python to do some system admin code, i am still in the > process of learning but I need a help on bellow code in urgent, i will be > really greatfull for any help > > Basically i wanted like this :- > > grep a line which has 1:0:0:12

Re: [Tutor] how to grep a word and make a dictionary from multiple lines.

2016-01-04 Thread Danny Yoo
On Mon, Jan 4, 2016 at 2:29 PM, Fosiul Alam wrote: > Hi Expert, > I am learning python to do some system admin code, i am still in the > process of learning but I need a help on bellow code in urgent, i will be > really greatfull for any help Question: how would you do this task with regular Uni

[Tutor] how to grep a word and make a dictionary from multiple lines.

2016-01-04 Thread Fosiul Alam
Hi Expert, I am learning python to do some system admin code, i am still in the process of learning but I need a help on bellow code in urgent, i will be really greatfull for any help Basically i wanted like this :- grep a line which has 1:0:0:129 , and get the LUN number(i.e 36006016565656563434