Create ifs.sh

Internal Field Seperator
This commit is contained in:
Ankam Ravi Kumar
2018-06-16 17:50:33 +05:30
committed by GitHub
parent c75b62699e
commit 8da1a9fadd

20
ifs.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#Purpose: Internal Field Seperator
#Version:1.0
#Created Date: Wed Jun 13 21:58:18 IST 2018
#Modified Date:
#WebSite: https://arkit.co.in
#Author: Ankam Ravi Kumar
# START #
LINE=`cat /etc/passwd |grep $1`
IFS=:
set $LINE
echo "User Name = $1"
echo "Password = $2"
echo "UID = $3"
echo "GID = $4"
echo "Description = $5"
echo "Home Directory = $6 "
echo " Current Shell = $7"
# END #