[Linux-bruxelles] [bash]

Grégoire Alexandre gregoire.alex at easynet.be
Sam 27 Déc 18:08:52 CET 2003


Bonjour la liste,

petit probleme de script bash, ke j arrive pas a faire fonctionner
voici le script

#!/bin/bash
OLDIP=`cat /tmp/noip_old`
NEWIP=`cat /tmp/noip_new`
if["$OLDIP" != "$NEWIP"]
then
	echo "New ip here !"
	/etc/init.d/proftpd restart &> /dev/null
fi
exit 0

l interpreteur bash me dit:
if[212.34.23.12: command not found
line 5 syntax error near unexpected token  'then'
line 5 'then'

je comprends pas les erreurs, je cherche juste a tester si deux strings sont 
egaux, et si oui, faire un echo et executer une commande.

Voila,
merci d avance de votre aide!




Plus d'informations sur la liste de diffusion Linux-bruxelles