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
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment