Question

First line of script --

PATHS=()

results in Syntax error: "(" unexpected

What is going on here? Can I not use arrays in my init.d script? Is it being interpreted by a shell that uses different syntax for arrays?

Running on Ubuntu 10.04 server.

Was it helpful?

Solution

Because it isn't a bash script (despite the fact that somebody had made the shebang line #!bin/bash). Ubuntu uses dash, which requires different syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top