Giter VIP home page Giter VIP logo

Comments (4)

johnraff avatar johnraff commented on June 17, 2024

Entirely up to you. If there are "bashisms" (like [[...]] instead of [...]) then you need bash. If there's an execution speed issue (as there was with the places menu) then a switch to dash will speed things up quite a bit, but some constructions will be ruled out.

"Places" had to pup up a menu almost instantaneously even for a big directory full of odd files and subdirectories. Other pipe menus might not be so pushed for speed. Also, hardware is now faster than it was when "places" was written.

In general, if you don't need bash then it makes your scripts more portable to use the generic shell.

from bunsen-pipemenus.

AlexDaniel avatar AlexDaniel commented on June 17, 2024

Yeah, but "more portable" is not required in our case, right? Also, by not using bash features you are making your code less readable and more error-prone, so please stick to bash (and its features) unless you really know what you're doing (BashPitfalls is a good start to add more sense to your scripts). In case of pipemenus it was proven (although some people are probably still not convinced) that switching from bash to sh does not bring a good enough speedup compared to better code style and less use of dependencies. Also, if you need more speed, you can try using something more advanced (perl comes to mind).

from bunsen-pipemenus.

 avatar commented on June 17, 2024

On Debian, for the average user, it doesn't really matter if you do #!/bin/bash or #!/bin/sh in scripts. Bash and dash (to which /bin/sh is linked by default IIRC) however differ in execution speed; dash can be significantly faster -- I do notice the speed difference even on a i5 @ 2,9Ghz, I use dash as a shell for procmail etc. It should be up to the developer to decide what shell he wants to use. Both are available most of the time anyway.

from bunsen-pipemenus.

capn-damo avatar capn-damo commented on June 17, 2024

I'll leave it as it is then :)

from bunsen-pipemenus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.