delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/05/12:05:37

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT
X-Spam-Check-By: sourceware.org
Date: Fri, 5 Aug 2011 19:58:49 +0400
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <1123189864.20110805195849@mtu-net.ru>
To: "Sebastien Vauban" <wxhgmqzgwmuf AT spammotel DOT com>, cygwin AT cygwin DOT com
Subject: Re: Portable shell code between Cygwin and Linux
In-Reply-To: <80ei15lj87.fsf@somewhere.org>
References: <80hb65b3ue DOT fsf AT somewhere DOT org> <20110729201651 DOT GB13084 AT calimero DOT vinschen DOT de> <1686210011 DOT 20110730161401 AT mtu-net DOT ru> <80ei15lj87 DOT fsf AT somewhere DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Greetings, Sebastien Vauban!

>> Must be
>>
>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid /tmp/openvpn.pid &'
>>
>> that's where his problem began, IMO.

> That's interesting. I thought this was completely equivalent (~ or $HOME), and
> preferred the shorter version.

For bash, that's true.
But for POSIX shell, or any other random shell - I doubt that much.
Anyway, if you want to write portable script, use POSIX shell syntax.
Yes, you'd lack some shortcuts, but the end result will be that your script is
more likely to work on random system, than not.


--
WBR,
 Andrey Repin (anrdaemon AT freemail DOT ru) 05.08.2011, <19:56>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019