I have a shell script that adds users from a csv to a running nextcloud instance. The nextcloud instance is running inside docker containers. For some reason, I am getting an error from the line that is using process substitution <(anonymous pipe). Other than the errors that I'm getting back, the script does everything I expect it to. Even with the errors, the users are added and I can see no adverse side effects. Any ideas? Here's my script.
#!/bin/bash
input_file="./users.csv"
# Input File
# jack,Jack Ripper,test_group,
# jill,Jill Ripper,test_group,
# johny,Johny Appleseed,test_group,
while IFS=, read -r f1 f2 f3
do
<(docker-compose exec -T --env OC_PASS=nomoremonkeysjumpingonthebed --user www-data app php occ \
user:add --password-from-env --display-name="${f2}" --group="${f3}" "$f1" )
done <"$input_file"
exit 0
When I run that script I get the following on stdout.
./batch_users.sh: line 11: /dev/fd/63: Permission denied
./batch_users.sh: line 11: /dev/fd/63: Permission denied
./batch_users.sh: line 11: /dev/fd/63: Permission denied