Question: I have the command to perform the option but it is not working in vi. So I need help with writing script for this option.
I have the command to perform the option but it is not working in vi. So I need help with writing script for this option.
- Extract the process names and use a filtering command to sort and uniquely display the process names
- Extract the user names and use a filtering command to sort and uniquely display the user names
Mean I have script and if I press 1 option it should show all the process name with sort and uniq of specific file I selected to excite the script. and if I press 2 it should show all the usernames with sort and uniq.
The command I came with for both script is below and it is working correctly. But I dont know how to put these files in vi so that it can work on script.
- awk'BEGIN{FS="|"; OFS="|"} {print $2}' dailyUserProcs.20200401 | sort | uniq
- awk'BEGIN{FS="|"; OFS="|"} {print $1}' dailyUserProcs.20200401 | sort | uniq
The file has 3 column, first one is name, second one is process and third one is numbers of logins.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
