i have an email address and i am wanting to split the email in the first letter of the firstname and full last name and put them in a place holder. eg: firstname.lastname@email.com
x = f
y = lastname
I did use try firstCharacter=${email:0:1} to get the first char but am not sure how to get the last name.
Full code here
#!/bin/bash
file="users.csv.1"
Count=0
while IFS=";"; read email birthDate group sharedFolder
do
echo -e "Email: $email"
firstCharacter=${email:0:1}
echo $firstCharacter
IFS="."
read -ra
echo -e "Birth Date: $birthDate"
echo -e "Group: $group"
echo -e "shared Folder: $sharedFolder\n"
done < "$file"