This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.1


Thank you, Eric.  Will have to remember the semicolon to combine two
sed commands vs. trying to use "-e" which did not ever work properly
for me.  I knew there must have been a better way to combine sed
commands!

On Fri, Oct 24, 2014 at 11:57 AM, Eric Blake <eblake@redhat.com> wrote:
> On 10/24/2014 11:28 AM, Keith Christian wrote:
>> uname_r ()
>> {
>>     uname -r | sed -e 's/[.(/\)]/_/g' | sed -e 's/\(.*\)\(_$\)/\1/'
>> }
>
> Or for one less fork and less typing:
>
> uname_r ()
> {
>   uname -r | sed 's/[.(/\)]/_/g; s/_$//'
> }
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]