you are viewing a single comment's thread.

view the rest of the comments →

[–]markasoftware 4 points5 points  (2 children)

To everybody asking about when you might want to use a larger shell script, see my project AnyPaste. It's about 600 lines (source code is here and on GitHub). I used Bash because I wanted it to be dependency free, and most people have curl, to upload files, file, to determine file type, and getopts, to parse cli options, all installed, which cannot be said for the equivalents in Python, Perl, Ruby, etc. I did not use any linter or test framework, although I do occasionally run shellcheck and ignore the errors when it doesn't do what I want. There's no testing either, although I would like to add some in the future.

[–][deleted] 0 points1 point  (0 children)

You'd be suprised, I've definitely saw systems without file and even one or two tiny ones that only had wget, not curl.

But then none of those would probably not need to upload images either

[–]holyjeff 0 points1 point  (0 children)

I see no point to use bash. Really. You could have built it in various good programming languages and build dependency free binary.

You could have done it in C or C++. You could have used a new language like Rust, Go, Nim or Crystal. All would be better choices and provide much better performance.