bug-bash
[Top][All Lists]
Advanced

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

Re: piped functions cannot set variables


From: Chet Ramey
Subject: Re: piped functions cannot set variables
Date: Thu, 19 Dec 2002 08:13:28 -0500

> under sh and ksh the following code echos 1
> 
> fred() { A=1; } ; unset A ; echo hello | fred ; echo $A
> 
> this does not work in bash.

Read the Bash FAQ, question E4.

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

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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