Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.unix.shell,comp.os.linux.misc Subject: Re: Over-Elaborate Shell Scripting Date: Thu, 12 Mar 2026 09:58:16 -0700 Organization: A place where nothing fits quite right Lines: 23 Message-ID: <20260312095816.00001163@gmail.com> References: <10otpi4$1opu8$3@dont-email.me> <10otrqi$1p9ft$1@dont-email.me> <10ou2q9$1qp29$1@dont-email.me> <10oucet$vo4d$2@news.xmission.com> <10ouhk5$22anv$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Thu, 12 Mar 2026 16:58:21 +0000 (UTC) Injection-Info: dont-email.me; posting-host="fa3006237c4cf97c7e06c32fa38dfc81"; logging-data="2263229"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cqcQjd190fRNEk1PbjdqXr2SllMu6/gY=" Cancel-Lock: sha1:9xqoOxjrWDwmbx49OzP2x8Q39RY= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.unix.shell:26657 comp.os.linux.misc:82888 On Thu, 12 Mar 2026 14:12:21 +0000 The Natural Philosopher wrote: > Perhaps that is why I never ever shell script if at all avoidable. > Like Regexp, and PERL it seems to be the province of wannabe gurus > who cant code C. Horses for courses. C is much more capable for general-purpose work, but it requires a lot more wrangling (or an external library) to do batch file operations effectively. F'rexample, I'm in the process of putting together a home-grown "static site generator" for use with a free host that doesn't allow server-side stuff like PHP; the job is to assemble complete HTML files for each page from header/sidebar templates and page-specific content files. It's totally possible to do that in C, but I'd have to either roll my own code or pull in non-stdlib dependencies for stuff like enumerating/ looping over the files in a directory; shell script makes that a first- class language feature. And the core of the work (tacking files to each other) is likewise something that's easily doable in C, but provided out of the box in the shell (it's just what cat is designed and named for.)