Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: G Newsgroups: comp.os.linux.misc Subject: Re: Bashing Bash Just a Bit Date: 1 Dec 2022 14:34:25 GMT Organization: Lines: 39 Sender: Gip Message-ID: References: <20221129020246@news.eternal-september.org> <20221129201048@news.eternal-september.org> <6388581c@news.ausics.net> X-Trace: individual.net Qi2KqUQBA57z3mg0aa4kvART6wEr9a45pqSpBsUhoODoQm3RiV X-Orig-Path: not-for-mail Cancel-Lock: sha1:/L3n/R1Ye7buq+QDchAr1dvXR+M= User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/6.0.10-100.fc35.x86_64 (x86_64)) Xref: csiph.com comp.os.linux.misc:36265 Computer Nerd Kev wrote: > 26C.Z969 <26C.Z969@noaada.net> wrote: >> >> If you have to do major research/experiments to kinda >> make it work in Bash then you shouldn't use Bash for >> whatever. > > Ohh where's all the fun in that? But with Bash you at least do > those experiments during development. With Python the experiment > is done every time you try to run a script you found on the web and > discover it requires some older/newer version (maybe a minor > version, as has been my experience). Or when you upgrade the > interpreter and discover all the stuff they've now broken in your > own scripts. No thanks! > > I get that if you're appauled by Bash as a programming language, > there are other options that you might like better. I'm not > appauled though, and I expect that anyone who is would have > discovered Python or other alternatives for themselves anyway. > I think that the problem is that Bash is not a programming language it's a script language intended to do stuff that you would otherwise do from the CLI. One of my latest bash scripts, among other things had to take a list of files of the form "somestuff-p*.dat" but not if there is a "-H" before the ".dat", where after p there is a parameter value that goes from .5 to 10 in irregular interval, run them in increasing param order through a program and collect the result in a file: ls somestuff-p*.dat |grep -v -e -H | sort -k 1.12 -n|xargs -n1 dostuff >> file.out I have no idea how to do that in any programming language I know, well not without wasting a lot of time... Writing programs in bash is like doing statistical analysis in Excel, people do that but it's not the way to go. G