Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #36300

Re: Bashing Bash Just a Bit

Message-ID <638a6c52@news.ausics.net> (permalink)
From not@telling.you.invalid (Computer Nerd Kev)
Subject Re: Bashing Bash Just a Bit
Newsgroups comp.os.linux.misc
References (6 earlier) <h8qcna5L_qHuSxv-nZ2dnZfqn_ednZ2d@earthlink.com> <RPMhL.11121$KVI.7388@fx14.iad> <QcWdnfcDxvMU3RX-nZ2dnZfqnPednZ2d@earthlink.com> <6388581c@news.ausics.net> <3ZidnaE4DqPpHBT-nZ2dnZfqn_ednZ2d@earthlink.com>
Date 2022-12-03 07:21 +1000
Organization Ausics - https://www.ausics.net

Show all headers | View raw


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.

>> 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.

>   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.

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.

-- 
__          __
#_ < |\| |< _#

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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