Script that will read and generate a report


Using shell scripting, create a script that will read the /etc/passwd file and generate a report that displays all user ID's and the shell associated to them. You may use pseudo-code if you are unsure of the exact syntax needed.
Using the following as input:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

Generate the following:
UserName Shell
---------- ------------
root /bin/bash
bin /sbin/nologin
daemon /sbin/nologin
adm /sbin/nologin
lp /sbin/nologin
sync /bin/sync
shutdown /sbin/shutdown 

Request for Solution File

Ask an Expert for Answer!!
Operating System: Script that will read and generate a report
Reference No:- TGS090490

Expected delivery within 24 Hours