Question

 Write another shell script named user_check.sh that takes a username as input. The script should check if the given user is currently logged into the system.

 

If the user is logged in, it should display: "[Username] is currently active on the system."

 

If the user is not logged in, it should display: "[Username] is not logged in.

12 Sep 2025
Answer :
Word Count : 117
Here is the shell script as per the requirements for Operating System Concepts & Networking Management Lab: ```bash #!/bin/bash echo -n "Enter username to check: " read username # Check if user is currently logged in if who | awk '{print
_______ ____ ___ _________ _________ _______ _______ _____ _____ ___ __________ ___.
___ ___ _________ _____ ________ ______ ________ _____ ___ _____.
__________ ________ ________ _____ _______ _____.
_______ ________ _________ _____ ____ _________ _______ _______ _______.
___ ______ ________ ________ _________ ________ ______ _________ _______.
_________ ________ ________ _____ _______ ____ ______ ___ __________ ___ __________ _____.
___ ________ ___ ______ ____ _________ ________ _______ __________ _______.
__________ ______ ______ ________ _________ ___.
____ _____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCSL 63 2025 2026 -  Write another shell script named user_check.sh that takes a user | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→