Knowns and Unknowns
Friday, October 29, 2010
Find out gcc version in a script
user@local$ gcc -v 2>&1 | tail -1 | awk '{print $3}'
4.4.3
Only want the major version number:
gcc -v 2>&1 | tail -1 | awk '{print $3}'|cut -d. -f1
4
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)