Page 1 of 1

[BASH]ed my head in

Posted: Wed Aug 22, 2012 1:30 pm
by Isaac
So if I go

SLDKFJLSKJDF="-Wall" make

What exactly is SLDKFJLSKJDF? It seems to work fine no matter what I change it to.

This remeinds me of

WINEPREFIX=".Officexp2007" wine "/adsf/adsfasdg/adsfdd/setup.exe"

This let me install programs into the file .Officexp2007

Now I'm seeing something similar with

BLAHBLAH="-Wall" make helloworldz

What is this BLAHBLAH="-Wall" thing???

I'd look it up but I'm not even sure that this terminal thing is called.

edit: Ok they're called "environment variables". Got it!

Re: BASHed my head in

Posted: Wed Aug 22, 2012 4:31 pm
by Valin Halcyon
DOS had em too... Remember SETBLASTER=220,5,1 by any chance?

Re: BASHed my head in

Posted: Wed Aug 22, 2012 7:52 pm
by Jeff250

Code: Select all

$ env | grep FOO
$ export FOO=BAR
$ env | grep FOO
FOO=BAR
$ unset FOO
$ env | grep FOO
$ FOO=BAR env | grep FOO
FOO=BAR
$ env | grep DISPLAY
DISPLAY=:0.0
$ echo $DISPLAY
:0.0
SLDKFJLSKJDF="-Wall" make
Assuming this was originally CFLAGS, this environment variable is used by Makefiles to pass options to the compiler. (-Wall enables extra warnings with gcc.)