[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug when using: bash <bashscript
From: |
jg |
Subject: |
bug when using: bash <bashscript |
Date: |
Wed, 17 Jul 2002 11:25:40 +0200 |
Hi,
there is an error in bash, that occours, under the following conditions:
- when calling a shell script that does not contain the trailing
#!/bin/bash
- from another bash shell script that is piped
- to a bash instead of executed directly.
See test package to understand what I mean.
Tested on:
GNU bash, version 2.02.1(1)-release (sparc-sun-solaris2.6)
GNU bash, version 2.05.0(1)-release (powerpc-apple-darwin1.3)
GNU bash, version 2.05a.0(1)-release (powerpc-apple-darwin5.3)
Test instructions:
Untar tar archive (attached in mail),
change #!/bin/bash according your setup in bashinputbug2 and
bashinputbug.use
change gawk in bashinputbug bashinputbug2, if it is not in Your $PATH.
Execute the following lines in the package directory
bash <bashinputbug.use >output.bash
sh <bashinputbug.use >output.sh
./bashinputbug.use >output.bash2
Here are the results
bash-2.05$ cat output.bash
Testing bashinputbug1...
inputline:# file: bashinputbug.awk
inputline:{
inputline: print "inputline:" $0
inputline:}
Testing bashinputbug2 ...
inputline:1
inputline:2
inputline:3
bash-2.05$ cat output.sh
Testing bashinputbug1...
inputline:1
inputline:2
inputline:3
Testing bashinputbug2 ...
inputline:1
inputline:2
inputline:3
bash-2.05$ cat output.bash2
Testing bashinputbug1...
inputline:1
inputline:2
inputline:3
Testing bashinputbug2 ...
inputline:1
inputline:2
inputline:3
bashinputbug.tgz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug when using: bash <bashscript,
jg <=