Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I don't understand why you're so focused on syntax. I'd think that a language with similar syntax but completely different semantics would be much harder to learn than one with different syntax but similar semantics. – sepp2k Jan 15 '11 at 15:58
You could try scripting in csh which is, as they say, neither C like nor sh like. – bahamat Aug 24 '12 at 23:55

11 Answers 11

up vote 2 down vote accepted

If you're comfortable with Java, then try groovy, a scripting language based on the Java platform. There is almost zero learning curve.

share|improve this answer

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.

share|improve this answer
+1 it's not common for me to like the prose style in someone's stack exchange answer. i really hope you write a novel someday. – ixtmixilix Dec 25 '11 at 21:11

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.

share|improve this answer

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 :)

share|improve this answer
+1 for CINT: It is part of the awesome ROOT framework which is used for most of the data processing at CERN, so you know it will be actively developed for a while to come. – Janus Jan 17 '11 at 4:51

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.
share|improve this answer

Ch is a C and C++ interpreter, it can be used for scripting.

share|improve this answer

Install and try tcsh. You can also make it your default shell, if you want. Although I don't recommend it. ;-)

share|improve this answer
Recommending csh, even tcsh for scripting? Definitely not. (I'm not recommending Bourne-style shells either, but I'd recommend them over tcsh.) And for interactive use, bash and zsh overtook tcsh long ago. – Gilles Jan 15 '11 at 16:43
@Gilles - The question is not about recommendation, but about existence. csh is a shell scripting language with C-like syntax. The answer is valuable, even if csh is not. – mouviciel Jan 15 '11 at 17:58
@mouviciel Even though the word "recommendation" isn't in there, and the question is literally asking about the existence, it is apparent the author is intending to use one of the answers, thus, it is a recommendation. A disclaimer is definitely helpful. – Shawn J. Goff Jan 15 '11 at 18:17
While I agree that csh/tcsh should not be used for scripting it fails to mention existence of /dev/stderr and /dev/stdout – Maciej Piechotka Jan 16 '11 at 1:17
Despite its name and what its manual page states, csh syntax is extremely remote to the C language one. I have always been puzzled by that claim. Even awk is much more C-like. – jlliagre Jan 16 '11 at 13:51

php-cli, can be quite useful.

php has a bad reputation, but since php version 5 the language is actually quite ok. And the syntax is similar to C/C++/Java.

share|improve this answer

There is cling Cern's project of C++ interpreter based on clang.

Here is Google Talk: Introducing cling, a C++ Interpreter Based on clang/LLVM

share|improve this answer
cling seems dead, so many dead links on their website. Does it even work on Windows already? – lama12345 Mar 27 at 4:35

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.