I am a beginner in Ubuntu bash and couldn´t find a solution after searching for hours.
I have a config file with lines like:
u:TestUser:rw:/home/temp/testFolder
I want to give the user the rights to this folder, but first I have to check if the user exists and if not, create that user.
The only problem I have is extracting "TestUser" from between the colons. With that I could check if the user exists with /etc/passwd.