Scsh
{{Short description|Unix shell}}
{{Infobox software
| name = Scsh
| logo = Scsh logo.png
| screenshot =
| caption =
| author = Olin Shivers
| developer = Brian Carlstrom
Martin Gasbichler
Mike Sperber
| released = {{Start date and age|1994|10|31|df=yes}}
| latest release version = 0.6.7
| latest release date = {{Start date and age|2006|05|16|df=yes}}
| latest preview version =
| latest preview date =
| repo = {{URL|github.com/scheme/scsh}}
| programming language = Scheme 48
| operating system = Unix-like
| platform = IA-32
| size = 4.2 MB
| language = English
| genre = Unix shell
| license = BSD-3-Clause
| alexa =
| website = {{URL|www.scsh.net}}
| standard =
| AsOf =
}}
Scsh (a Scheme shell) is computer software, a type of shell for an operating system. It is a Portable Operating System Interface (POSIX) application programming interface (API) layered on the programming language Scheme, in a manner to make the most of Scheme's ability for scripting. Scsh is limited to 32-bit platforms but there is a development version against the latest Scheme 48 that works in 64-bit mode.{{cite web |url=https://github.com/scheme/scsh |title=scheme/scsh: A Unix shell embedded in scheme|website=GitHub |access-date=2024-01-12}} It is free and open-source software released under the BSD-3-Clause license.
Features
Scsh includes these notable features:
- Library support for list, character, and string manipulations;
- Regular expressions manipulation support using scheme regular expressions, a domain-specific language (DSL), or little languages, approach to the abilities;
- Strong networking support;
- High-level support for awk like scripts, integrated into the language as macros;
- Abstractions supporting pseudo terminals;
- A shell language, modeled using quasi-quotation.
Example
- Print a list of all the executables available in the current PATH to the standard output:
- !/usr/local/bin/scsh -s
!#
(define (executables dir)
(with-cwd dir
(filter file-executable? (directory-files dir #t))))
(define (writeln x) (display x) (newline))
(for-each writeln
(append-map executables ((infix-splitter ":") (getenv "PATH"))))
"Acknowledgments"
The reference manual for Scsh includes a spoof Acknowledgments section{{cite web |url=http://philip.greenspun.com/wtr/dead-trees/acknowledgments.html |title=Acknowledgements (reprinted in Philip Greenspun's book, Database-backed Web Sites) |website=Philip Greenspun |access-date=2018-12-04}} written by Olin Shivers. It starts:
:Who should I thank? My so-called "colleagues", who laugh at me behind my back, all the while becoming famous on my work? My worthless graduate students, whose computer skills appear to be limited to downloading bitmaps off of netnews? My parents, who are still waiting for me to quit "fooling around with computers," go to med school, and become a radiologist? My department chairman, a manager who gives one new insight into and sympathy for disgruntled postal workers?
and concludes with:
:Oh, yes, the acknowledgements. I think not. I did it. I did it all, by myself.
See also
{{Portal|Free and open-source software}}
References
{{Reflist}}
External links
- {{Official website|www.scsh.net}}
- {{GitHub|scheme/scsh}}
- [http://sourceforge.net/projects/scsh/ Sourceforge project page]
- [http://www.scsh.net/download/download.html Downloads]
{{Unix shells}}
{{Lisp programming language}}
Category:Scheme (programming language) interpreters
Category:Scheme (programming language) implementations
Category:Software using the BSD license
{{Unix-stub}}