delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/26/20:25:19

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
To: cygwin AT cygwin DOT com
From: =?ISO-8859-1?Q?Sven_K=F6hler?= <skoehler AT upb DOT de>
Subject: Re: "which" command does not expand "~" in path
Date: Mon, 27 Sep 2004 02:25:49 +0200
Lines: 14
Message-ID: <cj7ml6$f5s$1@sea.gmane.org>
References: <1094385246 DOT 5803 DOT ezmlm AT cygwin DOT com> <6 DOT 1 DOT 2 DOT 0 DOT 1 DOT 20040926005459 DOT 02810cb0 AT mail DOT ros DOT com DOT au> <cj4diq$1du$1 AT sea DOT gmane DOT org> <cj4np8$b17$1 AT sea DOT gmane DOT org> <cj6vur$cqc$1 AT sea DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0409262003520 DOT 630 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: pd953c3b7.dip.t-dialin.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040817
In-Reply-To: <Pine.GSO.4.61.0409262003520.630@slinky.cs.nyu.edu>
X-IsSubscribed: yes

>>But is there any command that give's me the home for a given username?
> 
> bash -c "echo ~username"

Oh well, beside bash (and any other big programm called shell)

> Or you could write one using the getpwnam() call (better yet, the
> reentrant versions, getpwnam_r()), and submit it to, say, cygutils (since
> sh-utils is no longer being actively developed).

I just wondered how to write a "correct" shell-script that runs with 
/bin/sh, and it seems there is no way "shell-script"-way to figure out a 
  user's homedir.


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