I'm writing a Bash script. My problem is I want to read from the text file line-by-line and split the line by a character. I want pure Bash code.
Let's say I have this in the text file:
Format: (name;username;code)
John Doe;johnDoe;534092
John Dor;johnDor;923845
Joan Doe;Joan;232423
I want to know how to split the string (line) by character ";".
I need to know this because of what I want to do next: I want to read this text file and for every name in the file make a new user (with the same home directory as name), the password should be the code, and default should be Bash.
I'm reading the file with while read line ...
.