Nice one, -q However that command will still count an empty line that yum outputs, even with -q; it could also create problems due to stderr. I'd use something like: yum -q check-update 2>/dev/null|grep -c -v ^$ -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro ----- Original Message ----- > From: "SternData" <subscribed-lists@xxxxxxxxxxxxx> > To: "CentOS mailing list" <centos@xxxxxxxxxx> > Sent: Wednesday, 22 May, 2019 16:03:39 > Subject: Re: how to find out the number of updates for a system > maybe > yum -q check-update | wc -l > > On 5/22/19 8:42 AM, Ralf Prengel wrote: >> Hallo, >> I need the information how many updates are available for a system. >> What is the best way to find it out in a one line bash script. >> >> Von meinem iPad gesendet >> _______________________________________________ >> CentOS mailing list >> CentOS@xxxxxxxxxx >> https://lists.centos.org/mailman/listinfo/centos >> > > > -- > -- Steve > _______________________________________________ > CentOS mailing list > CentOS@xxxxxxxxxx > https://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx https://lists.centos.org/mailman/listinfo/centos