Bs (programming language)
bs is a programming language and a compiler/interpreter for modest-sized programs on UNIX systems. The bs command can be invoked either for interactive programming or with a file containing a program, optionally taking arguments, via a Unix shell, e.g., using a Shebang (Unix) #!/usr/bin/bs . An early man page states, "[ bs ] is a remote descendant of Basic [sic] and SNOBOL4, with a little C thrown in."
bs is a programming language and a compiler/interpreter for modest-sized programs on UNIX systems. The bs command can be invoked either for interactive programming or with a file containing a program, optionally taking arguments, via a Unix shell, e.g., using a Shebang (Unix) #!/usr/bin/bs . An early man page states, "[ bs ] is a remote descendant of Basic [sic] and SNOBOL4, with a little C thrown in." The bs language shares some features and syntax with BASIC, SNOBOL, and C, the two former presumably inspiring its name. Like BASIC, it can be used interactively, either executing statements immediately or collecting them into a program to be executed subsequently. Like in SNOBOL4, the assignment operator ( = ) is used for I/O and bs can execute code in strings, using its eval function. It also includes SNOBOL's interrogation operator ( ? ) used to test whether an expression evaluation succeeds or not. The built-in format function, limited to one argument, supports a subset of C's printf format conversion specifiers, e.g., "%f". The language has some conspicuous elements. For instance, its program functions are defined using the fun ... nuf syntax and its functions can have local variables. Also, bs can operate in two modes, either interpreting (and executing) statements and programs or compiling them, and switching between the two using compile and stop . Otherwise, its functionality is unique only collectively (in one language), since individual features are redundant with those of coexisting tools, such as the Unix Shell, e.g., file I/O and loops, and AWK, e.g., associative arrays and Regular expression matching. The bs language was meant for convenient development and debugging of small, modular programs. It has a collection of syntax and features from prior, popular languages but it is internally compiled, unlike a Shell script. As such, in purpose, design, and function, bs is a largely unknown, modest predecessor of hybrid interpreted/compiled languages such as Perl and Python.
References
- ^ "A/UX: Development Tools" , Apple, Inc , 18 February 2012. Retrieved on 9 September 2019. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ Personal conversation with Dick Haight, 12 September 2019. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ "Language BS" , 99 Bottles of Beer , 8 August 1996. Retrieved on 9 September 2019. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b "Volume 1". AT&T UNIX PC UNIX System V User's Manual (PDF) . AT&T. 1986. p. 8. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ J. D. Doan, ed. (May 1981). CB-UNIX Programmer's Manual, Edition 2.3 (PDF) . Columbus, OH: Bell Telephone Laboratories. p. iii. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ T. A. Dolotta; R. C. Haight; E. M. Piskorik, eds. (May 1977). "Section 1". PWB UNIX Programmer's Manual, Edition 1 . Piscataway, New Jersey: Bell Telephone Laboratories. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b "Section 1 (a-c)". AIX Version 6.1 Commands Reference (PDF) (First ed.). International Business Machines Corporation. 2007. p. 251. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ "Section 1 (a-c)". AIX Version 7.2 Commands Reference . IBM Corporation. 2018. p. 282. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ "Section 1 (A-L)". A/UX Command Reference (PDF) (2.0 ed.). Apple Computer, Inc. 1990. p. 93. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ "CB/UNIX bs(1)" , The Unix Heritage Society , November 1979. Retrieved on 2 July 2025. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ Personal communication from Dick Haight, 10 September 2019. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ The /FILES file, A/UX 3.0.1 installation media, Apple Inc. (1993) Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b "Section 1 (A-M)". HP-UX Reference Release 11i User Commands (PDF) (1 ed.). Hewlett-Packard Company. 2000. p. 93. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b c Personal conversation with John R. Mashey , 9 September 2019. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b "IBM Goes UNIX". PC Magazine . June 12, 1984. p. 218. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ "Volume 1 Commands and Utilities". UNIX Programmer's Manual (PDF) . AT&T. 1986. p. 41. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b c d UNIX User's Manual (Release 3.0 ed.). Bell Telephone Laboratories, Incorporated. 1980. p. 95. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
- ^ a b UNIX User's Manual (PDF) (Release 3.0 ed.). Bell Telephone Laboratories, Incorporated. 1980. p. 9. Wikipedia revision 1298405542, retrieved 2026-11-19 · 1795042800.0
Cite this
"Bs (programming language)". 1751437227. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1298405542