Hi ! I'm very noob and just started to learn unix. I have readed the manual but I still have many problems. Like, could you help me with these?
1. How can I print users which are running some process, like pine? I just wan't to print usernames, and maybe that process name.
Am I even close? find -user -a | ps -a | grep pine That gives error from that "-user -a" but prints something...
2. How can I cut some text from these lines? Am I even close? grep FINDTHIS /user/file | cut ????
1:x:1078:FINDTHIS JEE, sometext, more
1:x:10523:FINDTHIS JEE, yeah, some again, something
4:xx:105233:FINDTHIS PLOM, plaaplaa, jeh
1:x:1078:FINDTHIS PLIM, foo, jeh
2:x:104:FINDTHIS FOO, fighter, foo, foo
So I have those lines in file, I wan't to cut ONLY text between ':' and ',' That should produce only these lines:
How can I do it?
3. How to print ALL system's useraccount names, and ONLY names, and ONLY each accountname ONCE? And that list should be in alphabetical order and reverse.
4. How to count and print the number result for this? User's which are running some process, like pine, and count each user ONLY ONCE.
5. I have large txt file. How can I print results which comes from only lines 50-60 and chars 10-15 from each line?
And I have done this--> rtfm... Still can't do those :) But almost.. Help?