We want a Bash script which will take a list of usernames on the command line and print out which of those users is currently logged on, in alphabetical order, on one line. Please correct/complete...


We want a Bash script which will take a list of usernames on the command line and print out which of those users is currently logged on, in alphabetical order, on one line.Please correct/complete below code and attach screenshot of output.


for name in *
do
who | grep -w "^name" | sed -e ’s/ .*//’ | uniq
done | sort | tr ’\n’ ’ ’
echo



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here