[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash 4.0.x sourcing
From: |
Gabor Z. Papp |
Subject: |
bash 4.0.x sourcing |
Date: |
Tue, 28 Apr 2009 13:30:45 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) |
Hello,
$ bash --version
GNU bash, version 4.0.17(1)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Apr 27 08:51 /bin/sh -> bash
$ cat bla
#! /bin/sh
cd /tmp
rm -f aaaa
echo "id" > aaaa
if [ -f "aaaa" ]; then echo "sourcing aaaa"; . aaaa; fi
$ ./bla
sourcing aaaa
./bla: line 5: .: aaaa: file not found
$ bash ./bla
sourcing aaaa
uid=101(gzp) gid=101(gzp)
groups=101(gzp)
Is this "file not found" problem known in bash4?
Using ". ./aaaa" solves the problem too.
- bash 4.0.x sourcing,
Gabor Z. Papp <=