Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #36360
| Subject | Re: Bashing Bash Just a Bit |
|---|---|
| Newsgroups | comp.os.linux.misc |
| References | (7 earlier) <RPMhL.11121$KVI.7388@fx14.iad> <QcWdnfcDxvMU3RX-nZ2dnZfqnPednZ2d@earthlink.com> <6388581c@news.ausics.net> <3ZidnaE4DqPpHBT-nZ2dnZfqn_ednZ2d@earthlink.com> <638a6c52@news.ausics.net> |
| From | "26C.Z969" <26C.Z969@noaada.net> |
| Date | 2022-12-04 22:14 -0500 |
| Message-ID | <pcmdnSFU_amp_xD-nZ2dnZfqnPWdnZ2d@earthlink.com> (permalink) |
On 12/2/22 4:21 PM, Computer Nerd Kev wrote: > 26C.Z969 <26C.Z969@noaada.net> wrote: >> On 12/1/22 2:30 AM, 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? >> >> >> To a point I very much understand ... but some of us >> do this for a LIVING ..... the boss expects working >> product within a certain timeframe ............ >> >> Linux/Unix are hard-working systems ... the backbone >> of pretty much everything. My job is to put it to work. > > Yes well that's where I'd point out the long-term compatibility > issues with Python, as indeed I did. Those exist ... but tend to be very long term. Whatever it is, you'll probably have to scrap/re-write it by then anyway. Such incompatibilities exist in every real computer language. This is not an excuse to never write programs in 'C' or Java or whatever - nor an excuse to push Bash to its ridiculous incomprehensible extremes in the name of "backwards compatibility". BTW, it's only "backwards compatible" so long as those who come after you can GRASP it properly. If it's a jumble they'll throw it in the bin immediately rather than waste the time and start from scratch. >>> 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! >> >> From long experience, I've rarely had the kinds of >> problems you describe. The biggie was P2 to P3. > > Well as I said before then, it's a matter of personal > opinion/experience. If Bash does what you want and you don't find > it that hard to write/read, then it has proven better at long-term > compatibility than Python, so still seems a good choice for me. I > don't see how everyone needs to be converted to the way of the > Python just because some people don't like Bash. Then I'd never use it - but DO. However I also understand its various limitations and know when to quit and move to a better scripting language. >> Since >> then if you stick to the more 'established' lib routines, >> preferably not ones from a rarely-visited GitHub site, >> you generally will not have issues. What you find on >> GitHub or beyond ... well ... they're usually intended >> as "examples" and you WILL have to re-tweak them to >> suit your purposes. Same goes for 'C'/Pascal/Java or >> anything for any other language. > > Not needing to find libraries and figure out the associated > functions is one benefit of Bash in my book. Although Python can > call external programs, and you can make libraries for Bash, so > it's not a clear distiction. Bash is just better geared for using > external programs, so if speed isn't as issue (best to go > straight to a compiled language if it is), it's easier, and > actually I'd propose less error-prone if you're working on such > scripts intermittently. > >>> 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. >> >> My script commands a service (in 'C') to create a >> temporary share - and we back up from that. The issue >> is that if your script has a problem the 'temporary' >> share remains open and vulnerable. The process manages >> those shares - and, as included in the command you >> send from Bash, you limit the max time said share >> will continue to exist. If your script can't close >> it then the service WILL. >> >> This is a use for the faux TCP device. >> >> But no documentation makes HOW to do that in Bash >> "obvious" to anyone who comes behind - it's just >> a jumble of arbitrary characters and redirects - >> and frankly I forget how it really works most of >> the time. If I was going to do it again I'd use >> Python instead of Bash for purposes of clarity >> and self-doc. > > Which I'd suggest is a consequence of TCP being on the fringe of > applications for Bash. It's again an individual case of pros and > cons. No built-in floating-point math or multi-dimensional arrays > are other things that come to mind, and where that's a limiting > factor then I'd take it as cause to use C instead, but Python or > other scripting languages would be another option if it was worth > the complication of becoming familiar with them. This was a "good" use for the faux TCP device you find in Bash and ksh. It made the overall script a lot easier and simpler - which, just doing this ONE weird trick, made it worth still using Bash instead of something else. At least there's a LITTLE documentation on the trick (ok, more a 'copy this, it works' sort of doc). But, had the need been a few ounces more I'd have writ it in P3 instead. It's the "next rung up the ladder" these days. > I don't see how this is anything special to Python vs Bash though. > It sounds now as if you're making a point of them as if it should > suit everyone to go and learn Python, even if only one script in > ten that they encounter might require something that's truely > awkward or poorly documented in Bash. It's just the same old > "this language is better because look how much easier to do _this_ > specific thing" argument that can be applied between any two > languages, and only really serves to start an argument. My point all along has been to use Bash for what Bash is best at and NOT balk at going a bit up the ladder as soon a you're into what Bash is NOT so good at. That Bash "CAN do it - eventually" is not a reason to use Bash. Python or even 'C' can do it too - and and with a lot less research and experimentation and a lot more clearly. Python is a mature scripting/interpreted language and thus fits most easily into situations where interpreted is better/more-flexible than compiled. For the latter kinds of apps I'll use 'C' or Pascal. Java is also a fair "step up" from Bash for some people which, like Python, "runs anywhere". No doubt you're a "bash guru" and take pride in how far you can push it, how well you know it's gobbledegoop syntax. Well, so long as you're only working for yourself - great. If other people will have to get involved sooner or later then ......
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-26 23:54 -0500
Re: Bashing Bash Just a Bit not@telling.you.invalid (Computer Nerd Kev) - 2022-11-28 06:56 +1000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-27 22:19 -0500
Re: Bashing Bash Just a Bit 8c065a96 <8c065a96@gmx.com> - 2022-11-28 16:10 -0500
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-30 00:44 -0500
Re: Bashing Bash Just a Bit "Carlos E.R." <robin_listas@es.invalid> - 2022-12-02 21:02 +0100
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 23:02 -0500
Re: Bashing Bash Just a Bit Bobbie Sellers <bliss@mouse-potato.com> - 2022-12-02 22:02 -0800
Re: Bashing Bash Just a Bit "Carlos E.R." <robin_listas@es.invalid> - 2022-12-03 12:35 +0100
Re: Bashing Bash Just a Bit marrgol <marrgol@address.invalid> - 2022-12-03 12:55 +0100
Re: Bashing Bash Just a Bit "Carlos E.R." <robin_listas@es.invalid> - 2022-12-03 13:31 +0100
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-11-28 09:19 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-29 12:11 -0500
Re: Bashing Bash Just a Bit John McCue <jmccue@magnetar.hsd1.ma.comcast.net> - 2022-11-27 22:13 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-27 23:04 -0500
Re: Bashing Bash Just a Bit Jack Strangio <jackstrangio@yahoo.com> - 2022-11-28 04:21 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-28 00:54 -0500
Re: Bashing Bash Just a Bit Roger Blake <rogblake@iname.invalid> - 2022-11-29 02:05 +0000
Re: Bashing Bash Just a Bit pH <wNOSPAMp@gmail.org> - 2022-11-29 03:16 +0000
Re: Bashing Bash Just a Bit Joerg Lorenz <hugybear@gmx.ch> - 2022-11-29 08:14 +0100
Re: Bashing Bash Just a Bit Joerg Lorenz <hugybear@gmx.ch> - 2022-11-29 08:12 +0100
Re: Bashing Bash Just a Bit Roger Blake <rogblake@iname.invalid> - 2022-11-29 18:46 +0000
Re: Bashing Bash Just a Bit Bobbie Sellers <bliss@mouse-potato.com> - 2022-11-29 11:27 -0800
Re: Bashing Bash Just a Bit Roger Blake <rogblake@iname.invalid> - 2022-11-29 20:13 +0000
Re: Bashing Bash Just a Bit Joerg Lorenz <hugybear@gmx.ch> - 2022-11-29 23:06 +0100
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-29 23:04 -0500
Re: Bashing Bash Just a Bit Joerg Lorenz <hugybear@gmx.ch> - 2022-11-30 06:22 +0100
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-30 00:28 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-11-30 09:32 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 02:21 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-02 11:22 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-06 23:42 -0500
Re: Bashing Bash Just a Bit Bobbie Sellers <bliss@mouse-potato.com> - 2022-11-30 08:00 -0800
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-11-30 17:57 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-01 00:50 -0500
Re: Bashing Bash Just a Bit Computer Nerd Kev <not@telling.you.invalid> - 2022-12-01 17:30 +1000
Re: Bashing Bash Just a Bit G <g@nowhere.invalid> - 2022-12-01 14:34 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 00:33 -0500
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-01 23:39 -0500
Re: Bashing Bash Just a Bit not@telling.you.invalid (Computer Nerd Kev) - 2022-12-03 07:21 +1000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-04 22:14 -0500
Re: Bashing Bash Just a Bit not@telling.you.invalid (Computer Nerd Kev) - 2022-12-06 07:59 +1000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-07 00:14 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-07 09:46 +0000
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-07 20:25 +0000
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-07 20:29 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-08 00:38 -0500
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-08 17:36 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-08 00:31 -0500
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-08 17:36 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-09 01:23 -0500
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-09 01:42 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-08 08:47 +0000
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-07 22:19 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-08 00:37 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-08 08:48 +0000
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-09 10:24 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-09 01:06 -0500
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-09 10:25 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-10 02:48 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-10 10:09 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-10 23:21 -0500
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-10 14:36 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-10 23:06 -0500
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-11 10:49 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-13 01:12 -0500
Re: Bashing Bash Just a Bit Pancho <Pancho.Jones@proton.me> - 2022-12-14 23:30 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-08 00:12 -0500
Re: Bashing Bash Just a Bit not@telling.you.invalid (Computer Nerd Kev) - 2022-12-13 12:09 +1000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-13 23:21 -0500
Re: Bashing Bash Just a Bit not@telling.you.invalid (Computer Nerd Kev) - 2022-12-15 07:39 +1000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-15 01:43 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-15 10:10 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-15 23:26 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-16 09:24 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-17 01:29 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-17 07:08 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-17 20:13 -0500
Re: Bashing Bash Just a Bit Richard Kettlewell <invalid@invalid.invalid> - 2022-12-17 09:14 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-17 20:36 -0500
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-18 02:26 +0000
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-18 12:11 +0000
Re: Bashing Bash Just a Bit Bobbie Sellers <bliss@mouse-potato.com> - 2022-12-17 21:04 -0800
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-15 10:12 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-16 00:07 -0500
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-01 07:53 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-04 22:30 -0500
Re: Bashing Bash Just a Bit Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2022-12-05 19:55 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-06 23:21 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-01 10:59 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 01:43 -0500
Re: Bashing Bash Just a Bit Rich <rich@example.invalid> - 2022-12-01 13:23 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 01:46 -0500
Re: Bashing Bash Just a Bit Rich <rich@example.invalid> - 2022-12-02 14:17 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 09:48 -0500
Re: Bashing Bash Just a Bit pH <wNOSPAMp@gmail.org> - 2022-12-01 20:53 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 02:07 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-11-30 09:31 +0000
Re: Bashing Bash Just a Bit Roger Blake <rogblake@iname.invalid> - 2022-12-01 00:46 +0000
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-12-01 10:59 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-12-02 00:38 -0500
Re: Bashing Bash Just a Bit The Natural Philosopher <tnp@invalid.invalid> - 2022-11-30 09:32 +0000
Re: Bashing Bash Just a Bit "26C.Z969" <26C.Z969@noaada.net> - 2022-11-29 23:15 -0500
csiph-web