[bash] unexepted end of file
Voilà l'erreur que j'ai quand j'execute ce script
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh
while IFS=, read types typepro name group pass homedir homepro
do
if [ "$types" = "[group]" ]
then
groupadd $name
fi
if [ "$types" = "[user]" ]
then
if [ grep -E "^$name:" /etc/passwd > /dev/null ]
then
echo user $name existe
else
if [ "$typepro" = "o" ]
then
useradd -d $homedir -g $group -m $name
smbpasswd -a $name -s << EOF
$pass
$pass
EOF
fi
fi
fi
done < $1 |
erreur :
Code:
1 2
|
line 26: syntax error: unexpected end of file |
Merci :)