Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UNIX shell written in a reasonable language? [closed]

Tags:

python

shell

unix

Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?

like image 995
teratorn Avatar asked Oct 05 '08 00:10

teratorn


People also ask

What language is shell script written in?

Shell scripts - sh, bash, csh, tcsh. Other scripting languages - TCL, Perl, Python.

Is Unix shell scripting a programming language?

A Unix shell is both a command interpreter and a programming language. As a command interpreter, the shell provides the user interface to the rich set of GNU utilities.

What is $? In shell script?

$? is used to find the return value of the last executed command. Try the following in the shell: ls somefile echo $? If somefile exists (regardless whether it is a file or directory), you will get the return value thrown by the ls command, which should be 0 (default "success" return value).

Is bash a shell or a language?

Bash is a powerful programming language, one perfectly designed for use on the command line and in shell scripts. This three-part series explores using Bash as a command-line interface (CLI) programming language.


1 Answers

  • Eshell is a Bash-like shell in Emacs Lisp.
  • IPython can be used as a system shell, though the syntax is a bit weird (supporting all of Python plus basic sh constructs).
  • fish has a core written in C, but much of its functionality is implemented in itself. Unlike many rare shells, it can be used as your login shell.
  • Hotwire deserves another mention. Its basic design appears to be "PowerShell in Python," but it also does some clever things with UI. The last release was in 2008.
  • Zoidberg is written in Perl and uses Perl syntax. A nice-looking project, shame it seems to have stalled.
  • Scsh would be a pain to use as a login shell (an example command from the docs: (run/strings (find "." -name *.c -print))), but it looks like a good "Perl in Scheme."
like image 199
skymt Avatar answered Nov 15 '22 21:11

skymt