Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'and for prompts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
and for prompts
Authored by: davey_w on Jun 12, '02 10:50:15AM

this line will extract just the version number - e.g. 10.1.5 - from sw_vers:

sw_vers | sed -n '/([0-9].)/s/.*: //p'

make sure you manually type the tab after the colon rather than just copying & pasting.

I use it in my prompt.



[ Reply to This | # ]