I feel really guilty for asking this. I am a beginner with bash and I wanted to make a simple script.
I have a syntax error, simplified the script to the maximum and still get the syntax error.
Would you guys be kind enough to guide me?
#!/bin/bash
while true
do
while read IP;
do
if true ;
then
echo "$IP";
fi
done < /var/www/html/people.txt
sleep 1
done
Gives me following error :
line 10: syntax error near unexpected token `done'
line 10: ` done < /var/www/html/people.txt
It seems to work on my friend's server but not mine.
EDIT : I simply had no idea I had to make a new line after the final done.