From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22363 invoked by alias); 25 Apr 2014 23:35:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 22341 invoked by uid 89); 25 Apr 2014 23:35:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Received: from smtpback.ht-systems.ru (HELO smtpback.ht-systems.ru) (78.110.50.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 25 Apr 2014 23:35:14 +0000 Received: from [91.76.98.252] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) id 1Wdpe6-0003We-CM; Sat, 26 Apr 2014 03:35:06 +0400 Received: from [192.168.1.10] (HELO daemon2) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 25 Apr 2014 23:09:34 -0000 Date: Fri, 25 Apr 2014 23:35:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <6959315.20140426030934@yandex.ru> To: Dawid Ferenczy , cygwin@cygwin.com Subject: Re: default shell In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00596.txt.bz2 Greetings, Dawid Ferenczy! > it's not a big deal, I just wonder what to execute, if I would like to > execute user's default shell (defined in /etc/passwd). For example in cmd.exe, > ConEmu or Console2. I don't want to hardcode a shell anywhere (in console > emulator configuration, some batch file etc.), I just want to auto detect > user's default shell and execute it. If it's possible :) Exactly the same what > does mintty. The answer depends on what you actually trying to do. Else, there's no simple answer. Default "default" shell is bash, but user can pick any other, and mintty does some trickery to find it out. You can try something like USERSHELL=$( XXX=$( getent passwd $USER ) echo ${XXX##*:} ) but there's no easy equivalent for *NIX scripting in CMD, that does this. Soo.... back to the original question. What you are trying to do, for what mintty isn't sufficient? -- WBR, Andrey Repin (anrdaemon@yandex.ru) 26.04.2014, <03:00> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple