From: Johannes Sixt Date: Fri, 20 Jun 2008 08:17:17 GMT Subject: Re: [PATCH 2/3] rebase-i: slight internal improvements Message-ID: <485B678D.3090800@viscovery.net> In-Reply-To: <20080620080153.GC7369@leksak.fem-net> Stephan Beyer schrieb: > Looks like *portable* shell programming is no fun :\ > On Fri, Jun 20, 2008 at 09:16:43AM +0200, Johannes Sixt wrote: >> others write the file name in front of the count, > > I did not really change anything that's related to the count, btw. You changed: - count=$(grep -c '^[^#]' < "$DONE") + count="$(grep -c '^[^#]' "$DONE")" It turns out that GNU grep and AIX 4.3's grep don't write the file name if only one name was given. Nevertheless, by passing the data on stdin we are on the safe side. And, btw, the outer quotes are not needed in this assignment. -- Hannes