delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/11/10:47:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: ericblake AT comcast DOT net (Eric Blake)
To: sds AT gnu DOT org, cygwin AT cygwin DOT com
Cc: Sam Steingold <sds AT gnu DOT org>
Subject: Re: Programatically finding value of "cygdrive" prefix
Date: Thu, 11 Aug 2005 14:47:29 +0000
Message-Id: <081120051447.8407.42FB65010003437A000020D722007340760A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

> > mount -p | sed -nr '2s,/([^ ]) +\S+ +\S+$,\1,p'
> 
> that's what I also tried before sending my e-mail.
> it does not print anything.
> 

Oh right, I missed a + to make \1 be more than one character:

mount -p | sed -nr '2s,/([^ ]+) +\S+ +\S+$,\1,p'

--
Eric Blake



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019