Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to coding
#1
I am new to python, if someones help or guide will be the great thankful.

Need to read file which has content like (aaa,bbb,ccc,ddd,.....) this may change everytime.

Read first column (aaa) and grep with the process ps -ef | grep -i aaa. it will give 4 lines. Get the out put of 4th line 8th column.

out put should be

Example:
aaa 11111 (8th column)
bbb 22222
ccc  33333

my code here
Reply
#2
we are glad to help, but you must post your code and ask specific questions regarding problem you cannot resolve yourself.
Reply
#3
Sure but basically I am familiar with shell. so i am finding difficult to startup.
Reply
#4
(May-23-2017, 10:31 AM)allwinchris Wrote: ps -ef | grep -i aaa

...

out put should be

Example:
aaa 11111 (8th column)
bbb 22222
ccc  33333
Why would that be the output? Wouldn't grep strip out all but the first line?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020