On Wed, Dec 14, 2005 at 02:45:42PM +0200, Timo Hirvonen wrote:
On Tue, 13 Dec 2005 21:20:57 -0800
Junio C Hamano [off-list ref] wrote:
quoted
freku045@student.liu.se writes:
quoted
. git-sh-setup
+[[ "$#" = "3" || "$#" = "4" ]] || usage
+
I do not see much advantage to use [[...]] construct here.
[[ ]] is bashishm. Does not work with ash.
test $# -ge 3 && test $# -le 4 || usage
You don't need to quote $# because it is always defined (and always
non-negative integer). You can't unset or set it.
Thanks. I guess this is what happens when you try to learn sh
programming from the bash manpage. :)
- Fredrik