X-Spam-Check-By: sourceware.org
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Subject: RE:  Two short scripts for Cygwin-Windows interoperation
Date: Thu, 4 Jan 2007 14:01:05 -0500
Message-ID: <31DDB7BE4BF41D4888D41709C476B657041695C3@NIHCESMLBX5.nih.gov>
In-Reply-To: A<loom.20070104T172439-137@post.gmane.org>
From: "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder@niaid.nih.gov>
To: "Rex Godby" <rwg3@york.ac.uk>, <cygwin@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l04J1RNi004394

Rex Godby wrote on Thursday, January 04, 2007 11:54 AM:

> Two tiny Cygwin shell scripts may be of use.  Each script has a
> single active line, which I include here (to try these from the
> command line, of course replace $1 with your desired argument):  
> 
> 1. To quickly find files and directories in "My Documents" and
> Desktop (down to a certain depth): 
> 
> find  "/cygdrive/c/Documents and Settings/$USER/Desktop"       \
>       "/cygdrive/c/Documents and Settings/$USER/My Documents"  \
>       -maxdepth 3 | grep "$1"
> 
> 2. To open an Explorer window in a specified directory (given in
> Cygwin style), or to open a document in the proper Windows
> application:  
> 
> /cygdrive/c/WINDOWS/explorer `cygpath -w "$1"`

As long as we're at it:

	/c> cat /usr/local/bin/explore
	#!/bin/bash
	cygstart --explore "${1:-.}"

This opens Windows Explorer in the directory specified on the command
line, or in the current directory if no directory is specified.

- Barry
  -  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
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/


