On 29 Dec 2005, at 21:46, Duncan McGregor wrote:
I think I'm a little closer, but still in the dark. When I run
$ actual_ver="`cc -v 2>&1 | grep -i 'gcc version'`"
$ echo $actual_ver
gcc version 4.0.1 (Apple Computer, Inc. build 5247)
Now you can't see this, but bash is colouring 'gcc version' red. I
didn't think anything of it, but if I try
$ echo "gcc version 4.0.1 (Apple Computer, Inc. build 5247)" | sed -
e 's/.*gcc version \([^ ]*\).*/\1/'
4.0.1
I reckon that there must be some control character spat out by cc -
v which is screwing with the regexp?
Duncan
Well the problem is solved, and I thought I'd better post back to the
list for the record. The problem *was* control characters, but not
from gcc. My .bash_profile has export GREP_OPTIONS="--color=always",
which is handy in most circumstances, but fatal here! Remove the
line, and all is hunky-dory.
Thanks to Martin for just enough direction to dig my own way out of
my hole.
Duncan
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Fink-beginners mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-beginners