This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Portable shell code between Cygwin and Linux
- From: Andrey Repin <anrdaemon at freemail dot ru>
- To: "Sebastien Vauban" <wxhgmqzgwmuf at spammotel dot com>, cygwin at cygwin dot com
- Date: Fri, 5 Aug 2011 19:58:49 +0400
- Subject: Re: Portable shell code between Cygwin and Linux
- References: <80hb65b3ue.fsf@somewhere.org> <20110729201651.GB13084@calimero.vinschen.de> <1686210011.20110730161401@mtu-net.ru> <80ei15lj87.fsf@somewhere.org>
- Reply-to: Andrey Repin <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@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