From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6891 invoked by alias); 5 Aug 2011 16:05:27 -0000 Received: (qmail 6883 invoked by uid 22791); 5 Aug 2011 16:05:25 -0000 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 Received: from mr0.ht-systems.ru (HELO mr0.ht-systems.ru) (78.110.50.55) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Aug 2011 16:05:03 +0000 Received: from [91.76.216.189] (helo=darkdragon.lan) by mr0.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1QpMtN-0006lA-TD; Fri, 05 Aug 2011 20:04:58 +0400 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 05 Aug 2011 15:58:50 -0000 Date: Fri, 05 Aug 2011 16:05:00 -0000 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1123189864.20110805195849@mtu-net.ru> To: "Sebastien Vauban" , cygwin@cygwin.com Subject: Re: Portable shell code between Cygwin and Linux In-Reply-To: <80ei15lj87.fsf@somewhere.org> References: <80hb65b3ue.fsf@somewhere.org> <20110729201651.GB13084@calimero.vinschen.de> <1686210011.20110730161401@mtu-net.ru> <80ei15lj87.fsf@somewhere.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-08/txt/msg00151.txt.bz2 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@freemail.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