delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/27/18:17:10

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
Message-ID: <20050727221654.56072.qmail@web31415.mail.mud.yahoo.com>
Date: Wed, 27 Jul 2005 15:16:54 -0700 (PDT)
From: Don Beusee <dbeusee AT yahoo DOT com>
Subject: which command returns incomplete paths that don't work with all commands
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

I am new to Cygwin, but very experienced with Unix/Linux.

I did this command, just to see how compatible cygwin is with Unix/Linux:
strings -a `which ps` | grep Header

This works on Unix/Linux (it correctly returns nothing for this executable,
but it returns a lot of stuff with Oracle Applications executables).  It
does not work with Cygwin because `which ps` returns /usr/bin/ps, which
can't be opened by the strings command:

sh-3.00$ strings -a `which ps`
strings: /usr/bin/ps: No such file or directory
sh-3.00$

Ideally, it would return the absolute path, with the actual extension left
intact.  In my case, that would be:

f:/cygwin/bin/ps.exe

This would work inside cygwin or outside - then I can do "strings -a `which
ps`" from sh or cmd/command.

Is there is a really good reason why the which command should return a path
that only cygwin programs can recognize?

-Don




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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