Got it, thanks for the info.
Thanks,
Fan
-Original Message-
From: Chet Ramey [mailto:chet.ra...@case.edu]
Sent: Wednesday, October 24, 2018 4:48 AM
To: Chen, Farrah ; bug-bash@gnu.org
Cc: chet.ra...@case.edu
Subject: Re: Environment variable "PS4" can not be passed to b
On 10/23/18 12:06 PM, Greg Wooledge wrote:
> On Tue, Oct 23, 2018 at 03:20:12PM +, Chen, Farrah wrote:
>> But in Bash script, it cannot work, it keeps its original value:
>> [root@fchen ~]# cat test.sh
>> #!/usr/bin/bash
>> echo $PS4
>> echo $FAN
>
> This is because you're doing it as root. B
On Tue, Oct 23, 2018 at 03:20:12PM +, Chen, Farrah wrote:
> But in Bash script, it cannot work, it keeps its original value:
> [root@fchen ~]# cat test.sh
> #!/usr/bin/bash
> echo $PS4
> echo $FAN
This is because you're doing it as root. Bash strips PS4 from the
environment when started as ro
Hello,
I found a strange phenomenon, just as the subject, environment variable "PS4"
cannot be passed to bash script, but any other variable, even self-defined
variable can be passed to bash script.
My bash version is "GNU bash, version 4.2.46(2)-release
(x86_64-redhat-linux-gnu)", I downloaded