Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
The problem statement, all variables and given/known data:
Write a command line that will display a sorted list of logged in users. Just display the username and no other information. To accomplish this task you must use the sed command (The cut command is not allowed).
Relevant commands, code, scripts, algorithms:
Must use the sed command.
The attempts at a solution (include all code and scripts):
I am not sure how to even go about this question. Still really new at shell scripting.
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Calvin College, Grand Rapids MI, USA, Johnson, CO 142
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
For starters I have been just trying to figure out the formatting of using the sed command with the who command. I have been trying w | sed and I am getting a weird result. Im guessing im barking up the wrong tree by trying to pipe w with sed. I was not able to find any similar examples in our book "Unix Shell Programing".
---------- Post updated at 12:20 PM ---------- Previous update was at 12:11 PM ----------
By the way if there are multiple sessions from same user, you can use sort to get rid of duplicates. Check the sort man pages to understand how to get unique values.