I am trying to lock the label type using korn shell script but I am not able to lock.
As I am new to Korn scripts can some one help me.
Here is my current code:
cmUsers="user1,user2";
myuserName=$ENV{LOGNAME};
#checking whether current user is part of cmUsers list or not.
if [[ "$cmUsers" =~ m/$myUserName/i ]]
# if user belongs to cmUsers list, then trying to lock the lable type,
# if it fails exiting the process, else printing the success message
"ct lock -nuser \"$cmUsers\" lbtype:${label}@/vobs/admin_rec" ;then
die"Unable to lock label type: \"${label}\"\n";
else
print "Label ${label} has been successfully locked by $cmUsers"
fi