flex version?

The port has
Code:
PORTNAME=       flex
PORTVERSION=    2.5.35
PORTREVISION=   1

After a 'make':

Code:
/usr/ports/textproc/flex/work/flex-2.5.35]# ./flex -V
flex 2.5.35

No idea where your 2.54 comes from. The port and the package are at 2.5.35(_1).

Oh, wait ;) There's another flex:

Code:
# flex -V
flex version 2.5.4

It's part of the base system: /usr/bin/flex.

Try [cmd=]/usr/local/bin/flex -V[/cmd].
 
Thanks, DD. This solves the mystery.

NOW, aren't things in /usr/local/bin supposed to trump /usr/bin - or am I making this up.

I supposed I'll just adjust my path, but can you shed some light on dealing with this kind of situation? I know when Perl was in base, there was a script that "updated" the Perl one saw. Is there a generic type of mechanism for this?

Cheers,
Brett

*UPDATE*

I saw that /usr/local indeed follows / and /usr. I symlinked /usr/local/bin/flex into my ~/bin, and I placed this directory in front of PATH. My question remains - how is one supposed to manage programs that are installed from ports that are also in base? In my case, I needed an older version - but the same deal would apply regardless. Thanks, again.
 
You should always supply the full path to the executable.
 
estrabd said:
In what context? Are you saying that the PATH variable is evil?

In scripts it's best to not rely on PATH and use the full paths to any executable. It's also the more 'safer' option, security-wise.
 
I agree. I always use full paths to everything, even basic stuff like sed/grep/awk, chmod, chown, etc.
 
Back
Top