How it works...

In this recipe, we have used while and for loops. The while loop will read our .csv file. It will create arrays for each column. We used -d for the home directory, -s for the bash shell, and -p for the password.

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.