Path: utzoo!news-server.csri.toronto.edu!rutgers!bellcore!uunet!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.questions Subject: Re: Shell compilers Message-ID: <1991Mar11.224454.1195@convex.com> Date: 11 Mar 91 22:44:54 GMT References: <26241@adm.brl.mil> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 36 Nntp-Posting-Host: pixel.convex.com From the keyboard of dichter@chdasic.sps.mot.com (Carl Dichter): :I am looking for compilers for shell scripts. : :I am particularly intrested in Bourne shell compilers, :but you can send me information on any shell language compilers. : :PS: I realize that you can use "#!/bin/sh" at the start :of the file to cause it to be interpreted by the correct :shell, but a compiled shell script is prefered for speed :and source protection. This would actually buy you very little. The slowness of a shell script could be helped just a little if you could compile the conditionals, but the principal source of lentitude is the algorithm people tend to use in shell scripts. The big problem with piping tools together is that there is only one pipe. This means that several different data streams have to get multiplexed into a single data stream, then demuxed on the other end of the pipe. This wastes processor time as well as human brain power. For example, you might be shuffling through a pipe a list of filenames, but you also want to indicate that certain files have a particular attribute, and others don't. (E.g., certain files are more than ten days old.) Typically, this information is encoded in the data stream by appending or prepending some special marker string to the filename. This means that both the pipe feeder and the pipe reader need to know about it. Not a pretty sight. I haven't met a shell script yet I couldn't make a lot faster by translating into a perl program. (I know: I was telegraphing my punch.) As for source protection, is what you're doing in your script really so important to your company's livelihood that you have to hide it? --tom