ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unsolved beyond bash shell scripting, what language should I use

    IT Discussion
    bash scripting linux fedora debian python go
    6
    20
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      So I have a need to move a few scrips beyond basic bash shell scripts.

      Typical OS is Fedora ecosystem, second most used is Debian.

      The script will need to execute other applications like ffmpeg and scp/rsync.

      What language should I use?

      I assume the first answer will be python, which I am not a fan of, but can use.
      Maybe go? Seriously open to suggestions.

      1 scottalanmillerS 2 Replies Last reply Reply Quote 1
      • JaredBuschJ JaredBusch marked this topic as a question on
      • 1
        1337 @JaredBusch
        last edited by 1337

        @jaredbusch said in beyond bash shell scripting, what language should I use:

        So I have a need to move a few scrips beyond basic bash shell scripts.

        Typical OS is Fedora ecosystem, second most used is Debian.

        The script will need to execute other applications like ffmpeg and scp/rsync.

        What language should I use?

        I assume the first answer will be python, which I am not a fan of, but can use.
        Maybe go? Seriously open to suggestions.

        There is no general answer to your question.

        The real question is what are you trying to accomplish that shell scripts can't or doesn't do a good job at? And what's the most suitable language/languages for that task?

        For example when you say "execute other applications" that implies shell scripts because that is what they do best. If you wanted to use ffmpeg libraries for encoding, decoding and such that would have been a totally different thing and shell scripts would'nt have been an option.

        JaredBuschJ 2 Replies Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch @1337
          last edited by

          @pete-s said in beyond bash shell scripting, what language should I use:

          For example when you say "execute other applications" that implies shell scripts because that is what they do best. If you wanted to use ffmpeg libraries for encoding, decoding and such that would have been a totally different thing and shell scripts would'nt have been an option.

          Shell or other, you are always calling another application to do something, with a little logic around it.

          One example is re-encoding my library. I ripped my DVD collection ~10 years ago and X265/HEVC was not a thing, so it is all X264.

          I don't want to bother getting my DVD boxes out as they are buried deep on the shelves in the garage. So I want to re-encode it.

          I have a script that grabs all the files in a directory, then checks for it to be 265 already.
          3dde027d-7698-408b-9a12-fc4f8ce218ec-image.png

          then renames and rencodes it with some hard coded language settings. I have one file for Japanese, another for English.
          50f2eb82-9b60-4ea7-b93b-6de9db5da3eb-image.png

          Sure the process works, but a real language will go much farther into proper routines and functions to let it handle things with one script.

          1 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @1337
            last edited by JaredBusch

            @pete-s said in beyond bash shell scripting, what language should I use:

            There is no general answer to your question.

            There is. Just because you cannot see it doesn't mean it does not exist.

            Each person's answer of a language is a general answer. Their reason for the recommendation allows me to see if it fits my need and skill and desire.

            ObsolesceO 1 Reply Last reply Reply Quote 0
            • ObsolesceO
              Obsolesce @JaredBusch
              last edited by

              @jaredbusch said in beyond bash shell scripting, what language should I use:

              @pete-s said in beyond bash shell scripting, what language should I use:

              There is no general answer to your question.

              There is. Just because you cannot see it doesn't mean it does not exist.

              Each person's answer of a language is a general answer. Their reason for the recommendation allows me to see if it fits my need and skill and desire.

              It might be an excuse to give Golang a whirl.

              JaredBuschJ 1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @Obsolesce
                last edited by

                @obsolesce said in beyond bash shell scripting, what language should I use:

                @jaredbusch said in beyond bash shell scripting, what language should I use:

                @pete-s said in beyond bash shell scripting, what language should I use:

                There is no general answer to your question.

                There is. Just because you cannot see it doesn't mean it does not exist.

                Each person's answer of a language is a general answer. Their reason for the recommendation allows me to see if it fits my need and skill and desire.

                It might be an excuse to give Golang a whirl.

                I have never done anything with it but I know @stacksofplates has done a bunch with it.

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • black3dynamiteB
                  black3dynamite
                  last edited by

                  While searching for alternatives to bash scripting, I noticed people mentioning Perl, Python, Go and Ruby.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • stacksofplatesS
                    stacksofplates @JaredBusch
                    last edited by

                    @jaredbusch said in beyond bash shell scripting, what language should I use:

                    @obsolesce said in beyond bash shell scripting, what language should I use:

                    @jaredbusch said in beyond bash shell scripting, what language should I use:

                    @pete-s said in beyond bash shell scripting, what language should I use:

                    There is no general answer to your question.

                    There is. Just because you cannot see it doesn't mean it does not exist.

                    Each person's answer of a language is a general answer. Their reason for the recommendation allows me to see if it fits my need and skill and desire.

                    It might be an excuse to give Golang a whirl.

                    I have never done anything with it but I know @stacksofplates has done a bunch with it.

                    Yeah it all depends. Prob the best option for this use case is to choose based on the libraries available for what you want to do.

                    However if you just want a binary you can ship around easily then Go is a great choice.

                    JaredBuschJ 1 Reply Last reply Reply Quote 1
                    • stacksofplatesS
                      stacksofplates
                      last edited by

                      Another plus for Go here is concurrency. Go makes concurrency really easy.

                      1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @stacksofplates
                        last edited by

                        @stacksofplates said in beyond bash shell scripting, what language should I use:

                        Prob the best option for this use case is to choose based on the libraries available for what you want to do.

                        I assume that anything people recommend today would have most libraries.
                        But that is part of why I ask.

                        stacksofplatesS 1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @JaredBusch
                          last edited by

                          @jaredbusch said in beyond bash shell scripting, what language should I use:

                          @stacksofplates said in beyond bash shell scripting, what language should I use:

                          Prob the best option for this use case is to choose based on the libraries available for what you want to do.

                          I assume that anything people recommend today would have most libraries.
                          But that is part of why I ask.

                          Yeah it depends. I've run into situations where the library might exist but it's garbage to use or just didn't exist, but you're right its not the norm anymore.

                          After spending the past 9-10 months writing microservices in Python I don't mind it. I used to not like it at all. This looks promising for Python:

                          https://github.com/kkroening/ffmpeg-python

                          This one for Go:

                          https://github.com/u2takey/ffmpeg-go

                          1 Reply Last reply Reply Quote 2
                          • 1
                            1337 @JaredBusch
                            last edited by 1337

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @JaredBusch
                              last edited by

                              @jaredbusch said in beyond bash shell scripting, what language should I use:

                              I assume the first answer will be python, which I am not a fan of, but can use.

                              Like it or hate it, I'd still recommend Python3 every time for this.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @black3dynamite
                                last edited by

                                @black3dynamite said in beyond bash shell scripting, what language should I use:

                                While searching for alternatives to bash scripting, I noticed people mentioning Perl, Python, Go and Ruby.

                                Yeah. Ruby is nice to write but... it isn't installed universally like Python (not that P3 is universal, but much closer to it.) I like Ruby way more than most people, and even I don't use it.

                                Perl... OMG I hate Perl.

                                Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                JaredBuschJ 1 Reply Last reply Reply Quote 0
                                • JaredBuschJ
                                  JaredBusch @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                  Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                  As these are systems that I control, there is no reason Go cannot be installed.

                                  Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                  stacksofplatesS 1 Reply Last reply Reply Quote 0
                                  • stacksofplatesS
                                    stacksofplates @JaredBusch
                                    last edited by

                                    @jaredbusch said in beyond bash shell scripting, what language should I use:

                                    @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                    Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                    As these are systems that I control, there is no reason Go cannot be installed.

                                    Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                    You normally wouldn't install it anyway as it's not a scripting language. You'd just compile your binary and ship that to your systems.

                                    JaredBuschJ 1 Reply Last reply Reply Quote 1
                                    • JaredBuschJ
                                      JaredBusch @stacksofplates
                                      last edited by

                                      @stacksofplates said in beyond bash shell scripting, what language should I use:

                                      @jaredbusch said in beyond bash shell scripting, what language should I use:

                                      @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                      Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                      As these are systems that I control, there is no reason Go cannot be installed.

                                      Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                      You normally wouldn't install it anyway as it's not a scripting language. You'd just compile your binary and ship that to your systems.

                                      I completely misunderstood that about Go. Okay, I will do a bit of checking and decide what I want to do.

                                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller @JaredBusch
                                        last edited by

                                        @jaredbusch said in beyond bash shell scripting, what language should I use:

                                        @stacksofplates said in beyond bash shell scripting, what language should I use:

                                        @jaredbusch said in beyond bash shell scripting, what language should I use:

                                        @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                        Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                        As these are systems that I control, there is no reason Go cannot be installed.

                                        Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                        You normally wouldn't install it anyway as it's not a scripting language. You'd just compile your binary and ship that to your systems.

                                        I completely misunderstood that about Go. Okay, I will do a bit of checking and decide what I want to do.

                                        oh sorry, I figured you knew. That's why I never look at it, I don't want to deal with binaries in that way. But nothing wrong with that. Write it on your machine at home, compile, ship binary. Works just fine.

                                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                                        • JaredBuschJ
                                          JaredBusch @scottalanmiller
                                          last edited by

                                          @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                          @jaredbusch said in beyond bash shell scripting, what language should I use:

                                          @stacksofplates said in beyond bash shell scripting, what language should I use:

                                          @jaredbusch said in beyond bash shell scripting, what language should I use:

                                          @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                          Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                          As these are systems that I control, there is no reason Go cannot be installed.

                                          Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                          You normally wouldn't install it anyway as it's not a scripting language. You'd just compile your binary and ship that to your systems.

                                          I completely misunderstood that about Go. Okay, I will do a bit of checking and decide what I want to do.

                                          oh sorry, I figured you knew. That's why I never look at it, I don't want to deal with binaries in that way. But nothing wrong with that. Write it on your machine at home, compile, ship binary. Works just fine.

                                          As fixed tasks, this is not a bad solution. So I will keep it in mind.

                                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @JaredBusch
                                            last edited by

                                            @jaredbusch said in beyond bash shell scripting, what language should I use:

                                            @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                            @jaredbusch said in beyond bash shell scripting, what language should I use:

                                            @stacksofplates said in beyond bash shell scripting, what language should I use:

                                            @jaredbusch said in beyond bash shell scripting, what language should I use:

                                            @scottalanmiller said in beyond bash shell scripting, what language should I use:

                                            Go is great as a language. But like Ruby, not installed generally. And fewer resources. If it was a greenfield new OS, yeah, Go for sure. But for practical reasons, Python I think.

                                            As these are systems that I control, there is no reason Go cannot be installed.

                                            Between your comments and prior ones from @stacksofplates I think I might try Go in order to learn it.

                                            You normally wouldn't install it anyway as it's not a scripting language. You'd just compile your binary and ship that to your systems.

                                            I completely misunderstood that about Go. Okay, I will do a bit of checking and decide what I want to do.

                                            oh sorry, I figured you knew. That's why I never look at it, I don't want to deal with binaries in that way. But nothing wrong with that. Write it on your machine at home, compile, ship binary. Works just fine.

                                            As fixed tasks, this is not a bad solution. So I will keep it in mind.

                                            Right, no big deal in this case.

                                            1 Reply Last reply Reply Quote 0
                                            • 1 / 1
                                            • First post
                                              Last post