"which" command does not expand "~" in path
Sven Köhler
skoehler@upb.de
Mon Sep 27 01:29:00 GMT 2004
>>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/
More information about the Cygwin
mailing list