I can neither code Bash nor Python (actually, I am only comfortable with C-like syntax), and, actually, am too busy and lazy to learn them now. But I would like to script some tasks. Is there a scripting language for GNU/Linux, having obvious and comfortable syntax for C/C++/C#/Java developers?
If you're comfortable with Java, then try groovy, a scripting language based on the Java platform. There is almost zero learning curve.
Pike is a scripting language with a C-like syntax. You've never heard of it? Consider this a point against: it's rarely installed by default, it doesn't have many libraries, there's not much literature about it, there aren't many people who can help you with it…
Just pick Perl or Python, the two major scripting languages on unix systems (plus the shell, but it's a trickier language and has a less general scope.). The syntax is only 1% of learning a language anyway. I'd recommend Python as the simplest of the two.
If you really want to program in C but not have the long steps of compiling & linking, check out the TCC: the Tiny C Compiler. It even supports running via shebang.
Ch is a C and C++ interpreter, it can be used for scripting.
CINT is another C & C++ interpreter. I don't know if you'd want to have to wrap commands in
though. Maybe a macro like the following (untested)
#define S(cmd) system(cmd);
might be useful in that approach, e.g.,
S("cp a b")
Maybe not :)
You should search for "learn python in 10 minutes".
It covers the most useful python features: lists, tuples, dictionnaries, classes, and of course its awesome indentation system.
Learn it, I personnaly considering python as important after C\C++, because it does so much by default, and as a scripting language, it serves a lot.
- Features everything you'll need as a programmer
- A VERY clean and easy syntax, its author says it can be 3 to 4 times more productive than c/c++
- Speed, but if you're not programming low level where performance matters, it's sufficient.
Install and try tcsh. You can also make it your default shell, if you want. Although I don't recommend it. ;-)
There are some packages available for node that facilitate system scripting.
The node package manager is probably the easiest way to install such packages; node itself can be built from source (with the v8 engine it runs on) or installed via some system package managers.
You may need to learn to use evented I/O in order to get much done.
I haven't written it yet, but the best scripting language for C would be... C. Compilers are fast enough now that you could write a little script wrapper that would compile and run your program. Indistinguishable from a scripting language that loads in the source and parses it before executing. When I get a script working, I'll post it.