Syntax error: "(" unexpected.
-
Code
main() { extern wakeup(); signal(SIGNALARM, wakeup); while (1); { alarm(5); pause(); } }
Mistake
./script.sh: 3: ./script.sh: Syntax error: "(" unexpected (expecting "}")
-
Try this:
#!/bin/bash main() { extern wakeup\(\); signal\(SIGNALARM, wakeup\); while [ 1 ]; do alarm\(5\); pause\(\); done } main
I'm the only one who's making mistakes on the team that I don't have in the system, but you may have: pause (may be replaced by sleep ? extern♪ signal and alarmThere's no other idea.