Sai_Bot

elegant_passwd

Nov 28th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2. #this shell script will display the passwd in a more elegant way
  3.  
  4. echo -e "enter username:  \c"
  5. read logname
  6. line=`grep $logname /etc/passwd`
  7.  
  8. IFS=:
  9. set $line
  10. echo "username: $1"
  11. echo "ID: $3"
  12. echo "Group ID: $4"
  13. echo "Comment Field: $5"
  14. echo "Home Folder: $6"
  15. echo "Default Shell: $7"
Advertisement
Add Comment
Please, Sign In to add comment