0

I have data as below , I want to read only a specific column and compare it with some standard values , kindly assist.

/dev/sda2             4.9G  1.5G  3.2G  32% /
/dev/sda9             3.9G   46M  3.7G   2% /
/dev/sda7              20G  8.1G   11G  45% /
/dev/sda6              81G   31G   46G  41% /
/dev/sda3              49G  128M   46G   1% /
/dev/sdb2             224G  135G   78G  64% /
/dev/sda5              49G  2.5G   44G   6% 
/dev/sda8              20G  5.7G   13G  31% 
Thierry Lathuille
  • 23,663
  • 10
  • 44
  • 50
Nalore
  • 59
  • 1
  • 1
  • 7
  • 1
    Welcome to StackOverflow! What have you tried so far? – Maximilian Peters Jun 03 '17 at 12:26
  • specify how are you trying to access the data, how it is stored, what error/problem you faced with your code and your desired result. – Gahan Jun 03 '17 at 12:29
  • I'm reading a .txt file , storing the content of it in variable.Then i check for a specific word in a text file and print it , below code:- – Nalore Jun 03 '17 at 12:51
  • cndc_p1=open("new.txt","r"),l1=cndc_p1.readlines() , for line_1 in l1: if "/dev/" in line_1: print(line_1) I'm getting output as above , however after checking this condition i need to read only "%" value – Nalore Jun 03 '17 at 12:52

0 Answers0