mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-07-25 01:28:51 +00:00
Create ifs.sh
Internal Field Seperator
This commit is contained in:
20
ifs.sh
Normal file
20
ifs.sh
Normal 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 #
|
Reference in New Issue
Block a user