[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange behaviour when sourcing files with functions
From: |
Henk Csaba |
Subject: |
Strange behaviour when sourcing files with functions |
Date: |
Fri, 08 Aug 2003 09:50:56 +0200 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -I.
-I/home/doko/packages/bash/bash-2.05a
-I/home/doko/packages/bash/bash-2.05a/include
-I/home/doko/packages/bash/bash-2.05a/lib -g -O2
uname output: Linux gold 2.4.20 #313 SMP Mon Jan 20 12:43:07 CET 2003 i686
unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05a
Patch Level: 0
Release Status: release
Description:
In the following '$' symbolizes the bash prompt and we imitate an interactive
bash session.
$ echo '. foo ooh ; echo $1' > fooscript
$ echo : > foo
$ bash fooscript aah
aah
$ echo 'fnc() { :; } ; fnc' > foo
$ bash fooscript aah
ooh
I find it very strange that the $1 of a script becomes overwitten by a .
command. It smells
like a bug.
Csaba
- Strange behaviour when sourcing files with functions,
Henk Csaba <=