I have two (Debian) Linux servers. I am creating a shell script.
On the first one I create an array thus:
#!/bin/bash target_array=( "/home/user/direct/filename -p123 -r" )
That works fine. But when I run this on the other server I get:
Syntax error: "(" unexpected
As far as I can tell both servers are the same. Can anyone shed some light on why this doesn't work?
If I type it into the terminal directly it is fine??
It would appear that when I run it as
I get the error, but if I run it as
it seems to be ok. What's the difference?