GNU bug report logs - #8420
dirname

Previous Next

Package: coreutils;

Reported by: "Michele Marigliano" <m.marigliano <at> almavivaitalia.it>

Date: Mon, 4 Apr 2011 15:29:01 UTC

Severity: normal

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: Michele Marigliano <m.marigliano <at> almavivaitalia.it>
Cc: 8420 <at> debbugs.gnu.org
Subject: bug#8420: I: bug#8420: dirname
Date: Mon, 04 Apr 2011 12:39:40 -0600
[Message part 1 (text/plain, inline)]
On 04/04/2011 11:37 AM, Michele Marigliano wrote:
> At end, I resolved it running the script in this way:
> ./script.sh
> and NOT
> . script.sh (my first run with error).

There is a large difference between sourcing a file in the current shell
(. script.sh, where $0 remains unchanged) and executing a script
(./script, where $0 changes to the script name); and as you discovered,
there are a large number of scripts that are not usable when sourced
instead of run as a script.

At any rate, glad to hear that you got things sorted out.

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 14 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.