A basic function that doesn't work
I've tried several modifications to see why it's not working, but I can't find the answer.
Here is my code, this is in french but this is just a normal fonction that ask to the user if he's ready to start.
#!/bin/ksh
function start
{
echo "Vous etes sur le point de lancer la generation, etes-vous pret(e)? [OUI/NON]"
read touche
case $touche in
[Oo] | [Oo][Uu][Ii] )
echo "Demarage du bash..."
;;
[Nn] | [Nn][Oo][Nn] )
echo "Annulation du bash..."
exit
;;
esac
}
start
This is what I get :
sh start.sh
: unfindable command
»art.sh: line 3: syntax error close to the « symbol
'tart.sh: line 3: `function start
My file was saved in DOS Format, I used dos2unix start.sh to convert it.