• aberrate_junior_beatnik@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    4 days ago

    The most useful bash command of all: sudo apt-get -y install zsh; chsh -s zsh; exec zsh ;)

    I kid, I kid! I actually like bash a lot. I really prefer it for scripting. Arrays are extremely useful but not specified in posix. Bash is pretty ubiquitous though.

    I’m also curious if there are any bash partisans who prefer it over zsh and for what reasons.

    • zarkanianOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      4 days ago

      I actually prefer fish, but I want to learn more bash because is is ubiquitous and a lot of bash stuff also works in fish.

    • ziggurat@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      I’m a serious bash scripter, I mean I do it both at work and as a hobby. And zsh arrays are better. Like you can use negative indecees and stuff. I have only written shell functions in zsh (my primary shell), and not thousands of lines of scripts like I have for bash. But if zsh had as good documentation and language servers I’d probably do many scripts in zsh instead. But I can’t say for certain, as I am not as sure about performance in some situations and stuff.

      Why don’t I use posix shell if I care about performance? Because they are only faster in very simple scripts,