Or use Julia for scripts https://github.com/ninjaaron/administrative-scripting-with-j...
Ruby: A great language for shell scripts
331–340 of 368 posts
Re: Ruby: A great language for shell scripts
#332Earlier quoted context omitted.
Interesting! I still find Python too verbose to stand in for shell scripts when Perl is available, with what I think is a decent chunk of experience.
Ha - I actually haven't changed my opinion about verbosity, Python is still more verbose and I will choose Perl for throwaway scripts even today; I just have a greater appreciation of readability of Python code compared to the free-for-all style-fest of Perl code (admittedly written by a bunch of devs with little code style enforcement). Perl is great for smaller scripts but I'm talking about many thousands lines of…
Re: Ruby: A great language for shell scripts
#333No it’s not a great language. Too many ways to do the same thing. Not packaged by default on most Linux. Monkey patching makes things even harder to debug.
yeah. The not packaged by default is the killer issue.
Re: Ruby: A great language for shell scripts
#334Java for the win. Have used java for any kind of programming or running shell commands or literally anything since last 5 years professionally and personally. Language is just a tool, anything and everything works if you love it enough
Re: Ruby: A great language for shell scripts
#335Overall a nice lite write up! Bash is great, but it occasionally becomes untenable, usually around the time where HTTP and whatnot becomes involved. Same goes for shell exec exit codes, you can use an API like popen3 for this: https://ruby-doc.org/stdlib-2.4.1/libdoc/open3/rdoc/Open3.ht... You mention using threads and regex match global variables in the same write up. Please use the regex match method response inste…
Thanks for the comment! Even though I wrote this about Ruby, I must admit that I am not a specialist.
Re: Ruby: A great language for shell scripts
#336Re: Ruby: A great language for shell scripts
#337Re: Ruby: A great language for shell scripts
#338Re: Ruby: A great language for shell scripts
#339Re: Ruby: A great language for shell scripts
#340Earlier quoted context omitted.
One advantage of a scripting language for scripts is that you can read it and see what it does one month later...
Sure, especially every bash script that goes over 200-250 lines is super readable. /s Or when you have to start using all the combinations of characters to achieve f.ex. proper iteration through an array without word splitting. Etc. to infinity. I've danced this dance hundreds of times and got sick of it. Gradually moving away from scripts and to Golang programs and so far it has been an improvement in almost every w…
sure if it's your "script" and you know exactly the code corresponding to it it might be ok, but that's a lot of overhead for a disposable script.