[ale] Need AWK Guru input

The Don Lachlan ale-at-ale.org at unpopularminds.org
Mon Aug 1 11:29:26 EDT 2011


On Mon, Aug 01, 2011 at 11:17:33AM -0400, Dennis Ruzeski wrote:
> Something like this?
> cat /etc/redhat-release |awk  '/release/ { for (x=1;x<=NF;x++) if
> ($x~"release") print $(x+1) }'

Wouldn't 'lsb_release -r' hand back the same info?

-L

> On Mon, Aug 1, 2011 at 10:52 AM, Chuck Payne <terrorpup at gmail.com> wrote:
> > Guys,
> >
> > I am working on adding servers to my Satellite server, and I like to
> > be able to get in with a script and call on the following
> >
> > /etc/redhat_release
> >
> > But I only want to get the number, so that I can see if it RHEL 4 or
> > 5, I been trying to do with awk, but I am not able to get anything,
> > what is the best way to only put numbers?
> >
> > --
> > (678) 636-9678
> > -----------------------------------------
> > Discover it! Enjoy it! Share it! openSUSE Linux.
> > -----------------------------------------
> > openSUSE -- en.opensuse.org/User:Terrorpup
> > openSUSE Ambassador/openSUSE Member
> > skype,twiiter,identica,friendfeed -- terrorpup
> > freenode(irc) --terrorpup/lupinstein
> > Register Linux Userid: 155363
> >
> > Have you tried SUSE Studio? Need to create a Live CD,  an app you want
> > to package and distribute , or create your own linux distro. Give SUSE
> > Studio a try. www.susestudio.com.
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list