Vivekanand Mathapati
Thursday, 21 May 2015
Write a shell script which accepts valid log-in names as arguments and prints their corresponding home directories, if no arguments are specified, print a suitable error message.VTU MCA LAB 2B
echo "Enter user name"
read usr
grep -w "$usr" /etc/passwd | cut -d ":" -f 6
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment