bug-bash
[Top][All Lists]
Advanced

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

Re: "set"-output cannot be reread


From: Chet Ramey
Subject: Re: "set"-output cannot be reread
Date: Tue, 10 Jul 2001 08:13:20 -0400

> Machine Type: i386-suse-linux
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
>         I understood this to mean, that I can redirect the output from
>         "set" into a file and later I can source that file with ".".
> 
>         But it seems, that the output of functions is not compatible for
>         reuse. They look like declarations of empty arrays, followed by
>         code between "{" and "}", that is immediately executed.
> 
> Repeat-By:
>         f() { echo function; }
>         set > /tmp/set.test
>         . /tmp/set.test
> 
> Fix:
>         no fix.

Upgrade.  This was fixed in bash-2.05.  `set' outputs function definitions
in a form that may be re-read.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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