Write a shell script that takes a file where each line is given in the format:

 F08, Venkat, Suman, Karthy, SCS, CSD, 3, L, 4, 15123 , V ,,

Creates a folder for each user name (eg: Venkat) and set the permission to rw access for user only (hint: use fs sa)

Ans:

#! /bin/sh

cat $1 |
while read line
do
     userid=echo $line | cut –d”,” –f2 
     mkdir $userid
     fs sa $userid $userid rw
done