Public bug reported:

Binary package hint: bash

system is feisty.
Initialisation of arrays do not work as expected, when being done in a script, 
whereas it works, when done from the command line.
Example:
Doing 
 NS=(`grep ^nameserver /etc/resolv.conf`)
 echo NS1: ${NS[1]}

on the command line, works.
The same in the follwing script:
#!/bin/bash 
#
NS=(`grep ^nameserver /etc/resolv.conf`)
echo NS1: ${NS[1]}
results in an syntax error:

x: 3: Syntax error: "(" unexpected

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New

-- 
bash assignment results in syntax error in script
https://bugs.launchpad.net/bugs/135765
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to