delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_PD,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4C802BB4.4000907@redhat.com> |
Date: | Thu, 02 Sep 2010 16:56:52 -0600 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
MIME-Version: | 1.0 |
To: | RISINGP1 AT nationwide DOT com |
CC: | cygwin AT cygwin DOT com |
Subject: | Re: How does one change the default shell? |
References: | <AANLkTimkOLm5Oo8uBUZTuVyvzWCwNquwC8aSGcWRpLip AT mail DOT gmail DOT com> <OF5981DAE8 DOT C47B1D51-ON85257792 DOT 007A77BD-85257792 DOT 007B8620 AT lnotes-gw DOT ent DOT nwie DOT net> <4C802658 DOT 9090105 AT redhat DOT com> <OF880B7999 DOT 5BEFBE62-ON85257792 DOT 007C8E54-85257792 DOT 007D6191 AT lnotes-gw DOT ent DOT nwie DOT net> |
In-Reply-To: | <OF880B7999.5BEFBE62-ON85257792.007C8E54-85257792.007D6191@lnotes-gw.ent.nwie.net> |
X-IsSubscribed: | yes |
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 |
On 09/02/2010 04:49 PM, RISINGP1 AT nationwide DOT com wrote: >>> write a script, I have to remember to put in the shebang line >>> (#!/bin/pdksh) or half the time my scripts won't work. >>> >>> Is there a way to change the default shell for cygwin? I checked the > user >>> guide and the FAQ, but no joy there. I tried setting and exporting the >>> SHELL variable, but that did not work. >> >> Assuming you meant the default shell for your particular user id, it is >> just a matter of changing cygwin.bat or whatever shortcut you are using >> to start cygwin to call pdksh instead of bash. You can also edit >> /etc/passwd to set your preferred shell (some tools, like mintty, honor >> that setting). > > This starts me off in pdksh, but when I execute a shell script, it runs > under bash. Ah, so you mean how to change /bin/sh to be pdksh instead of bash. Simple: cp /bin/{pdk,}sh But be prepared to redo that every time you upgrade bash via setup.exe, and don't come crying to the list if things break that were expecting bash when they got pdksh. > I did not realize I was commandeering the thread. My apologies - it won't > happen again. Merely changing a Subject: line does not change the In-Reply-To: headers that form threading. -- Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- 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 |