From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Accessing folders elsewhere than C:\cygwin
Date: Thu, 10 Feb 2011 20:36:00 -0000 [thread overview]
Message-ID: <20110210203553.GB32475@ednor.casa.cgf.cx> (raw)
In-Reply-To: <OF248AECF7.EB384F53-ON85257833.006FBBCF-85257833.007007D2@lnotes-gw.ent.nwie.net>
On Thu, Feb 10, 2011 at 03:23:38PM -0500, RISINGP1@nationwide.com wrote:
>Eric wrote on 02/10/2011 12:15:33 PM:
>
>> On 02/10/2011 10:13 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>> > Might the ability to identify cygwin's root be a good
>> > thing to add to cygpath?
>>
>> And what's so hard about 'cygpath -w /'?
>>
>> > Under "System information", one could have an option
>> >
>> > -R, --root output cygwin root directory
>> >
>> > where
>> >
>> > $ cygpath -Rw
>> > C:\cygwin
>>
>> Trading / for -R doesn't justify the bloat and burning another short
>> option character, in my opinion.
>
>If you need it ofetn enough, here is a simple script for displaying the
>cygwin root:
>
>case $1 in
> -w)
> mount | grep " / " | cut -d" " -f1 | sed 's:/:\\:g'
> ;;
> -u)
> DRIVE=$(mount | grep " / " | cut -d":" -f1):
> echo $(mount | grep "^$DRIVE " | \
> cut -d" " -f3)$(mount | grep " / " | cut -d" " -f1) | \
> sed 's/'$DRIVE'//'
> ;;
> *)
> echo "Please specify -w (Windows) or -u (Unix)"
> ;;
>esac
Why would we need a simple script to display the cygwin root when
"cygpath -w /" works fine?
cgf
--
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
next prev parent reply other threads:[~2011-02-10 20:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 14:46 Fergus
2011-02-09 15:38 ` Greg Chicares
2011-02-09 16:39 ` Corinna Vinschen
2011-02-10 17:13 ` Buchbinder, Barry (NIH/NIAID) [E]
2011-02-10 17:15 ` Eric Blake
2011-02-10 20:23 ` RISINGP1
2011-02-10 20:36 ` Christopher Faylor [this message]
2011-02-10 21:16 ` RISINGP1
2011-02-09 15:50 ` Jeremy Bopp
2011-02-09 15:53 ` Jeremy Bopp
2011-02-09 15:53 ` Andrew Schulman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110210203553.GB32475@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).