Public bug reported:

Binary package hint: dash

hi
I noticed a problem when migrating my server from centos to ubuntu  9.1. The 
scripts don't work anymore. I checked them on debian and other system, where 
they worked fine. However I'm not a pro in script writing, but still seams 
strange that they don't work anymore. So I would realy be happy if the problem 
could be solved somehow.


If I run the script I get the error:

ERROR:
    read: 160: Illegal option -a


 
CODE:
AbgleichProzess()
{
exec 3<&0
exec 0<$FILE

while read -a a line; do 
if [[ ! ${a[0]} = \#* && ${a[0]} ]]; then
        package_check=${a[0]}
        file_name_installation=${a[1]}
        file_location_package=${a[2]}
        file_name_package=${a[3]}

        if [[ ! $file_name_package ]]; then
                file_name_package=$file_name_installation
        fi

        if [[ $package_check == $1 ]]; then
                DateiAbgleich $path_packages $path_installation $1 
$file_name_package $file_name_installation $file_location_package
        fi

fi
done

exec 0<&3
}

The file the script tries to read looks like this:
 
FILE:
## Main
cms     Main.GroupConfig                /pub/netstreams/wikilib.d/
 
 
WORKING BASH:
bash, version 3.2.25(1)-release-(i686-redhat-linux-gnu)
Bash wos nicht funktioniert ubuntu 8.04:
 
UBUNTU BASH:
bash, version 3.2.39(1)-release-(x86_64-pc-linux-gnu)

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


** Tags: bash

-- 
shell script error if "read -a" is used
https://bugs.launchpad.net/bugs/474638
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

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

Reply via email to