sort active processes and show every process once
I would like to help me in the following problem:
i have to construct a sorted (by size) list of active processes in Minix. If a process is being executed more than once then its name must be only one time in the list. Finally i have to present the list in a "formatted" way. Than you in advance |
Are we expected to do your home/coursework for you? This is the second thread of this nature you have posted. A little self help wouldn't go amiss. Try using google to find the answers first before posting a request for help.
|
OP has now posted 3 homework questions...This is what I posted in the other 2 threads:
Homework!! The best way to get homework help here is to show us what you have tried. |
Did the OP think we wouldn't realise. :D
|
Quote:
We are breeding a whole new class of people in the world--characterized by ambition for advancement without any accompanying willingness to work or learn. They care only about securing a job and not about actually learning anything--much less contributing to society. Don't get me started!!!----no, wait!...you already did..... Never mind....;) |
I had a professor who was asked to teach a course on Linux (well it touched on the subject for 6 weeks) and had to ask in these very forums for the proper way to do things so he knew how to properly grade homework assignments. WOW interesting course that was.
|
sort active processes and show every process once
I have the following problem:
Print a Sorted List of active processes by size. Every process must be only 1 time in this list . My solution is: ps | sort | awk '{print $1}' Can i have a little help? |
sort active processes and show every process once (NEW THREAD)
I have the following problem:
Print a Sorted List of active processes by size. Every process must be only 1 time in this list . My solution is: ps | sort | awk '{print $1}' Can i have a little help? |
Size of what? 'ps' has --sort as well ('man ps' for criteria) and if you add '-eo cmd' (or args) it'll only display those.
|
if ps | sort | awk '{print $1}' shows you the information you want, but you need that information listed only once, pipe it through uniq.
ps | sort | awk '{print $1}' | uniq |
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be merged with http://www.linuxquestions.org/questi...s-once-626399/ and http://www.linuxquestions.org/questi...s-once-626318/ because it is a duplicate and both contain replies.
Note spamming LQ is not acceptable and the reason why you're doing this doesn't matter. |
Talk about gall!!!
After significant flak for posting homework, OP posts a new question without any acknowledgement of the interviening discussion. 100 demerits for jianelis---bad dog, VERY bad dog... |
A former boss of mine has attended a trade school. For the final each group was supposed to fix a Television. They had no idea how to proceed. One group dropped the set about 4 inches and it started working. A second group saw that and did the same. Sparks and smoke!
The school was shut down. |
lol, i am at the same university with that guy!! i have found almost all the problems he has posted, but i cannot post it :)
it's not difficult, by my "colleague" is a little bit bored :P also, he forgot to mention that he's using minix via vmware :P |
Quote:
|
hm... no.. he should open the book they've given us (UNIX programming environment - kernighan pike) and try see the man pages of the commands ;)
|
All times are GMT -5. The time now is 06:37 AM. |