bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Numbers in the begining of variable names generates problem


From: Daniel Hagberg
Subject: Numbers in the begining of variable names generates problem
Date: Fri, 11 Oct 2013 17:46:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Message-Id: <E1VUesQ-0005he-A8@StefanO-desktop>
Date: Fri, 11 Oct 2013 17:43:42 +0200

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall uname output: Linux StefanO-desktop 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:08:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.2
Patch Level: 25
Release Status: release

Description:
        the command:
export 2_ave=$(cat "$type"_"$simulation"_"$from_year"_"$to_year"_"$variable"_areaaverage.txt|grep -v Col|head -n 1|sed 's/ //g')
        generates:
                not a valid identifier
        but:
export _ave=$(cat "$type"_"$simulation"_"$from_year"_"$to_year"_"$variable"_areaaverage.txt|grep -v Col|head -n 1|sed 's/ //g')
        works fine ...

Repeat-By:
        A number in the beginning of the name generates this problem

Fix:

--
********************************
Daniel Hagberg

Physical Geography and Ecosystem Analysis
Land-Atmosphere Group
Lund University
Sölvegatan 12, 22362 Lund, Sweden.

Email     Daniel.Hagberg@nateko.lu.se

Phone     +46 46 2223659
Cellphone +46 735925452
********************************




reply via email to

[Prev in Thread] Current Thread [Next in Thread]