Unix & Linux
bash shell-script cygwin
Updated Fri, 20 May 2022 04:59:46 GMT

Cygwin, bash, change an environmental variable?

I have set up a Cygwin environment on my machine (Windows 8.1).

pol@pol-lap1 ~/Downloads/software/database/firebird/Firebird-

$ `set | grep unknown`
BASH_VERSINFO=([0]="4" [1]="3" [2]="33" [3]="1" [4]="release" [5]="x86_64-unknown-cygwin")
                echo "bash: $FUNCNAME(): \`${!OPTIND}': unknown argument" 1>&2;
                194,10xCelsius 194,unknown 198,offlinescanuncsectorct \

However, when I do env | grep -i unknown, nothing is returned.

pol@pol-lap1 ~/Downloads/software/database/firebird/Firebird-
$ env | grep -i unknown
pol@pol-lap1 ~/Downloads/software/database/firebird/Firebird-

Notice, the environmental variable's value is 4

pol@pol-lap1 ~/Downloads/software/database/firebird

Now, what I want to do is change the value of $BASH_VERSINFO[5] to x86_64-redhat-linux-gnu in order to "fool" the system into compiling a programme that I want.

I tried to export BASH_VERSINFO[5]=x86_64-redhat-linux-info, but that changed nothing.

Maybe I don't fully understand the difference between the set and the env commands in Linux. Why do I get a different value with set as with env?

I would be grateful if anyone could shed any light on these issue and let me know what I can do to change my variable.




bash: BASH_VERSINFO: readonly variable

Btw. see: Hacky method to unset readonly variable with gdb

External Links

External links referenced by this document: