Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 12 May 2003 10:36:03 -0400
From: Christopher Faylor <cgf-rcm@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: howto change home path in /etc/passwd
Message-ID: <20030512143603.GF23680@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Pine.GSO.4.44.0305121021020.393-100000@slinky.cs.nyu.edu> <1052749853.3ebfb01d553c8@webmail.imag.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1052749853.3ebfb01d553c8@webmail.imag.fr>
User-Agent: Mutt/1.4.1i

On Mon, May 12, 2003 at 04:30:53PM +0200, Sylvain.Ferriol@imag.fr wrote:
>OK but do you know how to get the username because in the cygwin terminal
>echo $USER or echo $USERNAME works
>but i 'm using a file install.bat which calls 'bash.exe instal.sh'
>and in install.sh:
>
>echo $USER....nothing
>echo $USERNAME....nothing
>
>any suggestions???

1) calm down.

2) "id -un" provides the login name.  You could do something like:

   USER="`id -un`"

   in your script

cgf
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.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/

