delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=xq6EgH3BndIMiRZ9 | |
gl7ZdryKmlaLVIMX7MOujKedYtwIxvA5Upjz+4mdpx9dfnXSAua8unr8gOh1W5gq | |
55VvxN4Yd3CFGqry0U5PbbjiAgXsLSPqpN/Wj+LMc7/iYiKczDeVL7j4meYqBylw | |
b+UcfbQXlQv2YQTP7hxI/l9Sjeg= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=mRM/grXPN6cr2hu5HOiHOb | |
ygLzg=; b=MYKQ2J6rXauGi84A9aNXR2vWcVAMRaTyTxkl0cybBI6I3d8MLxWqb+ | |
gB5tdx+pG1xMo1MIs6TzQgDsrTBct7C98IcD6dTwgK5k9EmOPncioHoiQtUFUEth | |
JfBcdfdjsnosteFqp8frt0fVZao0oeaK1RvdDs4lgsdufKGea0GxE= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
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 |
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 |
Date: | Sat, 26 Apr 2014 03:09:34 +0400 |
From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
Reply-To: | cygwin AT cygwin DOT com |
Message-ID: | <6959315.20140426030934@yandex.ru> |
To: | Dawid Ferenczy <ferenczy AT volny DOT cz>, cygwin AT cygwin DOT com |
Subject: | Re: default shell |
In-Reply-To: | <loom.20140424T185221-299@post.gmane.org> |
References: | <loom DOT 20140424T185221-299 AT post DOT gmane DOT org> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
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 AT yandex DOT 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |