On May 21, 2016 6:36:22 PM GMT+02:00, Andi Kleen <a...@firstfloor.org> wrote:
>From: Andi Kleen <a...@linux.intel.com>

>+if [ "$1" = "--kernel" ] ; then
>+  FLAGS=k
>+  shift
>+fi
>+if [ "$1" == "--all" ] ; then

== is legacy, s/==/=/

>+  FLAGS=uk
>+  shift
>+fi
>+
>+if ! grep -q Intel /proc/cpuinfo ] ; then
>+  echo >&2 "Only Intel CPUs supported"
>+  exit 1
>+fi
>+
>+if grep -q hypervisor /proc/cpuinfo ; then
>+  echo >&2 "Warning: branch profiling may not be functional in VMs"
>+fi

grep && echo would do but OK.

>+
>+case `egrep -q "^cpu family\s*: 6" /proc/cpuinfo &&
>+  egrep "^model\s*:" /proc/cpuinfo | head -1` in'''

head and tail both require -n nowadays (in fact since susv2, IIRC), so please 
head -n1

thanks,

Reply via email to