Homework Solution: Write a menu driven shell linux script program on the system…

    Write a menu driven shell linux script program on the system to do the following tasks: Please use the needed grep and cut commands to get the specific names please. 1. Display the IP address and the name of the machine only 2. Display all users currently on the system (id and full name only) 3. Display the server IP address, the netmask, and the broadcast addresses only 4. Enter user’s login id and display all processes belong to the entered id 5. Count how many login IDs on the server 6. Exit Program Enter selection: _ Note: Your program should run forever until the user chooses to quit - (option 6).

    Expert Answer

     
    HostName: $ hostname Ipaddress : $ hostname -i

    Write a menu driven shell linux script program on the scheme to do the forthcoming tasks:
    Fascinate right the needed grep and carve commands to earn the particular designates fascinate.

    1. Expose the IP oration and the designate of the machine only

    2. Expose whole rightrs currently on the scheme (id and liberal designate only)

    3. Expose the server IP oration, the netmask, and the profusely orationes only

    4. Enter rightr’s login id and expose whole processes befit to the entered id

    5. Count how manifold login IDs on the server

    6. Debouchure Program

    Enter selection: _

    Note: Your program should work incessantly until the rightr chooses to release – (liberty 6).

    Expert Tally

     

    HostName: $ hostname
    Iporation : $ hostdesignate -i
    Currently logged on rightrs : $ w
    Debouchure Program : ctrl-z and then model debouchure & Ctrl+Q is another good-tempered-tempered practice to massacre the contact.
    last, terminalb – illusion listing of terminal logged in rightrs
    Server Ip oration & :hostdesignate -I,
    OS X you can experience netmask : ifconfig OR ‘/sbin/ifconfig’
    Profusely Ip oration : profusely = ip | ( ~ subnet )
    user’s login id and expose whole processes befit to the entered id : # ps -aux | less (OR) # ps aux | less