Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.sources,net.unix,net.unix-wizards Subject: Re: converting sh scripts to C code Message-ID: <6854@utzoo.UUCP> Date: Tue, 24-Jun-86 17:44:01 EDT Article-I.D.: utzoo.6854 Posted: Tue Jun 24 17:44:01 1986 Date-Received: Tue, 24-Jun-86 17:44:01 EDT References: <151@sdsioa.UUCP> Organization: U of Toronto Zoology Lines: 20 > Has anyone out there written anything to convert sh scripts to > C code?? We have quite a few sh scripts around here and they > could run *far*quicker* if converted to C... There's at least one such commercial product, although it's probably not worth the cost if it's only a few scripts. However... if you have a modern shell (the ancient Bourne shell that comes with 4BSD does not qualify), you may not see all that much improvement. Once things like "echo" become builtins, it's not clear that you save much by avoiding the fork/exec. Real improvement would come from having the C program do the things that are done by sed or awk in shell programs, and *that* conversion would be far more complex. If you are not running the SVR2 sh or equivalent, you need to upgrade your shell. Only after that is accomplished is it worth considering conversion to C, in my opinion. -- Usenet(n): AT&T scheme to earn revenue from otherwise-unused Henry Spencer @ U of Toronto Zoology late-night phone capacity. {allegra,ihnp4,decvax,pyramid}!utzoo!henry