On Tue, 6 Oct 2015 12:04:29 +0300 Lars Wirzenius <l...@liw.fi> wrote:
> On Tue, Oct 06, 2015 at 10:47:43AM +0200, Jakub Wilk wrote: > > * Philip Hands <p...@hands.com>, 2015-10-06, 09:35: > > > sed -ne '/^flags\t/{s/\b\(fpu\|tsc\|cx8\|cmov\)\b/%/g;s/[^% > > > ]*//g;s/%%%%/i686 SUPPORTED/p}' /proc/cpuinfo > > > > Or a more readable version: > > > > [ $(lscpu | grep ^Flags: | grep -owE 'fpu|tsc|cx8|cmov' | wc -l) = > > 4 ] && echo i686 SUPPORTED > > Phil's second one works for me, yours does not, on a CPU identified as > "Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz" in /proc/cpuinfo. I don't > really know what the right test is (I don't keep of CPU changes), but > I changed Phil's sed into a shell script that I find more readable. > Attached. Hopefully that's helpful to someone and not too badly wrong. Hi! A minor heads-up: your script incorrectly uses "tac" instead of "tsc".