Is it ok to write simple cli scripts in java?

Is it ok to write simple cli scripts in java?

Attached: Java_programming_language_logo.svg.png (1200x2200, 120K)

Other urls found in this thread:

ammonite.io/#ScalaScripts
github.com/pathikrit/better-files
twitter.com/NSFWRedditVideo

sure, I mean there's better languages to use depending on your needs but Java is pretty good for RAD

use a scripting language like bash or python

what is RAD?

What if I only know java?

You can't write scripts in java, it's compiled, but then it's also interpreted, so maybe you can.

what do you want to do with your program?

nu-Jow Forums everyone

>the CLI I'm responsible for maintaining at work is written in C

I want to give youtube links as args and then download the html and search for the channel-external-id and then combined the string together to form a rss feed link and write it to a file

It would be easier with python or perl but java is fine

No

Rapid Application Development
at least in this context

Is it worth learning python to do it, I run Linux and java just feels weird towards the Linux environment, while python programs are essentially part of it

It's okay to do whatever you want. If you can hammer out a java program that solves the program then do it.

i see what you did there

Attached: francisco.jpg (704x492, 81K)

Yes
Nobody `actually` cares what language you use to write your simple shit, it's just a shitposting opportunity

no

Something like the following bash script can get the channel external id you're looking for (there appear to be multiple matches though), but idk how to make rss links.
#!/bin/bash
wget -q -O - "$1" | grep -oP 'data-channel-external-id="\K[a-zA-Z0-9\-]*(?=")'

Btw you definitely shouldn't learn something like python just for the sake of making a fairly simple program ~20% simpler at best.

Jow Forums inserted a line break into my code for seemingly no reason, it should be
wget -q -O - "$1" | grep -oP 'data-channel-external-id="\K[a-zA-Z0-9\-]*(?=")'

sure
also check out ammonite.io/#ScalaScripts

I'm gonna say "not really".

>python

Attached: laughing girls.jpg (960x792, 201K)

Sure. It's a pretty good language after all, contrary to the stupid kiddies who only code in javascript and work with their newest Angular or On Rails Framework.

We do it at work. Java is easier than bash and you have to use it if you need to interact with certain vendor APIs.

Unless you have to hook into something that requires Java libraries why bother over perl?

cause i dont know pearl

the startup time is long when compared to other languages

not every task is critical on startup time

*blocks your path*

Attached: ss-2018-05-25-03-38-48.png (1118x1026, 81K)

NO
Asshole

Use BASH

Attached: A1EF5362-0240-4A05-BE9B-74CCD0C1A34C.jpg (456x337, 130K)

In theory, but the file IO and stream stuff is annoyingly verbose, and you're going to do a lot of that.

Scala with better-files ( github.com/pathikrit/better-files ) will be easier, Python will be easier, typical BASH / ZSH / ... shell script will be easier.

please stop the python meme, its the worst language ever just behind LSL.

What's the problem with python?

>16 seconds to compile hello world
Graal is amazing but do you really want to compile simple cli scripts?

no, but the guy that wants "not-long" startup time can compile them if he so pleases

its a glorified messy glue language and brainlets uses it instead learn the right tools, for example instead of directly learn C++ and OpenCV no, they have to use python + tons of wrappers to deploy slow messy projects. The only good thing done in python is django, Everything else its brainlet bullshit including numpy, octave its 1000 times better.

>simple cli scripts

No, the language its ok if you gonna use it as glue language for example in blender, freecad, for short task. But moneys are forcing it making wrappers for whatever bullshit they think. For example PyQT, C++ QT programs runs fast, but pyQT bullshit startups like 5 times slower and has a lot of memory leaks.

My problem with java for such small applications is that they all feel slow because of the startup time of the jvm.