0

umm my script isn't working and I don't know why, it gives me the error

"update1.run: line 187: syntax error: unexpected end of file"

Here's my code

http://pastebin.com/4W4AwuY5

I would really appreciate any help you can give, thanks!

2
  • "update1.run: line 187: syntax error: unexpected end of file" Where is the line 187 ? Try to add an exit at the end of the script.
    – NickTux
    Jul 15, 2013 at 19:51
  • Close-voters: Questions about shell scripting on Ubuntu have always been considered on-topic here, and the script provided contains enough information for the question to be answered (as evidenced by the answer). Jul 15, 2013 at 22:43

1 Answer 1

2

You are missing a fi at line 18

read -p "If you are sure then type DUCKS in all caps. If not type that isn't DUCKS."
if [ "$REPLY" != "DUCKS" ]; then
        echo "QUACK..."
        exit 1
fi
gconftool-2 --set /apps/gnome-terminal/profiles/Default/title --type=string "Removing ads"

Quoting $REPLY helps too.

2
  • update1.run: line 18: syntax error near unexpected token gconftool-2' update1.run: line 18: fi gconftool-2 --set /apps/gnome-terminal/profiles/Default/title --type=string "Removing ads"'
    – Boncey
    Jul 15, 2013 at 19:56
  • Double check. You are undoubtedly missing a fi there.
    – jlliagre
    Jul 15, 2013 at 20:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .