Subject: Re: Bourne shell script help
To: NetBSD Users's Discussion List <netbsd-users@NetBSD.org>
From: Ben Collver <collver@peak.org>
List: netbsd-users
Date: 07/26/2006 11:42:14
On Wed, Jul 26, 2006 at 02:31:43PM -0400, Greg A. Woods wrote:
> Being a minimalist sometimes, I hate to waste fork/exec cycles and so I
> often try to do things like this in the fewest possible commands (though
> depending on shell implementations one might find this is still forks
> (and execs in) as many processes as the two-line expr example):
Since the length of the input string is known, I like Jeremy's solution
the best. It doesn't fork off any processes.
Unless the performance really mattered, my second choice would be cut
for clarity.
Ben