Announcement

Collapse
No announcement yet.

zsh

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    zsh

    I was reading the article about using zsh instead of bash from the Home page. What do you think about that?
    txWingMan

    #2
    Re: zsh

    Applies analogously: http://www.penguin.ch/dokuwiki/doku....ord_of_warning

    Comment


      #3
      Re: zsh

      Point taken.
      txWingMan

      Comment


        #4
        Re: zsh

        Originally posted by txHarleyMan
        What do you think about that?
        Although zsh is a very nice shell (I use it myself) it's always good to learn how to use bash effectively as well (since it's the de facto standard in the linux world)

        And, as UR pointed out, there might be some incompatibility issues with dash (which is run when sh is called in kubuntu...by default). The same goes with bash though, so if your scripts won't work, you should first check which shell it's running on.

        Incompatibility issues should be relatively rare though, since most scripts are made Bourne compatible (sh).

        (Tip:Remember to use #!/bin/bash and #!/bin/zsh in your scripts if you're doing someting fancy...that is, non sh compatible)

        Comment


          #5
          Re: zsh

          Sounds good. But whats the logic behind Dash when the standard is bash? I get confused easily...
          txWingMan

          Comment


            #6
            Re: zsh

            Originally posted by txHarleyMan
            But whats the logic behind Dash when the standard is Bash?
            The "official justification" is that with Dash the system boots a little faster
            - if at all ... but, as the saying goes, Linux is not made for (re-) booting

            Comment


              #7
              Re: zsh

              LOL. Good point. A lil faster meaning microseconds I assume
              txWingMan

              Comment


                #8
                Re: zsh

                Originally posted by txHarleyMan
                A lil faster meaning microseconds I assume
                It's more like "5 seconds won from rebooting, 5 days lost to recoding", I'd say ... nerd's humor

                Comment


                  #9
                  Re: zsh

                  So much for cost vs benefit
                  txWingMan

                  Comment


                    #10
                    Re: zsh

                    Originally posted by txHarleyMan
                    So much for cost vs benefit

                    Comment


                      #11
                      Re: zsh

                      Originally posted by txHarleyMan
                      But whats the logic behind Dash when the standard is bash?
                      The login/interactive shells are still bash by default

                      I get confused easily...
                      Understandable, it's a shell jungle out there :P

                      As for using dash by default, you're theoretically saving time/resources/whales each time an sh script is run in the background (like cronjobs etc.). Most maintenance scripts are Bourne compatible so they don't need the fancy interaction of more advanced shells.

                      The pitfall is of course that many people assume /bin/sh links to bash (as it does on many distributions) and use #!/bin/sh in their bash scripts, which can lead to problems.

                      It is debatable whether the 'benefits' overweigh the 'costs'...and everyone is free to form their own opinion

                      Originally posted by UnicornRider
                      It's more like "5 seconds won from rebooting, 5 days lost to recoding", I'd say ... nerd's humor


                      I think it's the special kind of laziness common to sysadmins that enables them to spend a week coding for something that will save a minute a week in the future...it'll start to pay back in roughly 200 years, well worth the wait.

                      Comment


                        #12
                        Re: zsh

                        " The pitfall is of course that many people assume /bin/sh links to bash (as it does on many distributions) and use #!/bin/sh in their bash scripts, which can lead to problems. "

                        Confusion setting in again.
                        txWingMan

                        Comment


                          #13
                          Re: zsh

                          Originally posted by txHarleyMan
                          Confusion setting in again
                          Debian default:

                          Code:
                          # ls -l /bin/sh
                          /bin/sh -> /bin/bash
                          Ubuntu default:

                          Code:
                          # ls -l /bin/sh
                          /bin/sh -> /bin/dash
                          (further ranting )

                          Comment


                            #14
                            Re: zsh

                            OK. I followed the instructions in Ranting. I added the code also into /etc/rc.local

                            /etc/rc.local is Not overwritten with an upgrade?
                            I think it would be ..
                            txWingMan

                            Comment


                              #15
                              Re: zsh

                              Originally posted by txHarleyMan
                              /etc/rc.local is not overwritten with an upgrade?
                              Upgrade in terms of "package renewal": no (not to my knowledge, that is);
                              upgrade in terms of "change of release": yes (I daresay; I've never tried ...).

                              Comment

                              Working...
                              X