Conditionnel pour la coquille de poisson

Je vais à travers le tutoriel shell de poissons et de find que ce simple bloc if-else ne fonctionne pas

if grep fish /etc/shells echo Found fish else if grep bash /etc/shells echo Found bash else echo Got nothing end 

Message d'erreur:

 /usr/bin/fish Found fish fish: global root block fish: Could not locate end of block. The 'end' command is missing, misspelled or a ';' is missing. end - end a block of commands. 

Probablement vous avez une version très ancienne (1.x) de poisson installée, qui est antérieure à la construction else-if. Qu'est-ce que fish --version sortie fish --version ? Idéalement, vous voulez 2.1.0.