ised: numeric sequence editor
ised is a command-line tool for generating number sequences and arithmetic
evaluation. Unlike big gui-based software (e.g. Mathematica, Derive, Matlab,
Octave,...) it is intended for use in shell scripting, together with
gnu core utilities.
Its main advantage is that all functions are generalized to operate on
one-dimensional arrays. It can be used for loop indexing (much like seq),
line-by-line arithmetic processing of files, floating point math for
shells that don't support it natively, or interactively, as
extended calculator.
Since version 2.3.0, ised is Turing complete.
Modes of operation
- interactive mode
-
if called without arguments, ised opens a command prompt, which works as extended text-based calculator.
In this mode, command history is enabled (via gnu readline library).
- one-liners
-
ised evaluates its arguments as numeric expressions. It provides
the ability to handle floating point expressions for shells which don't
support it natively, for example bash.
- as a filter
-
ised can be used to apply an expression to every line of input, given as a
file or standard input. It provides a way for manipulation of
numeric data and works well in a pipeline with other core utilities.
Features
- Generalization of arithmetic operators for arrays.
- Simple syntax, compatible with c-like programming languages when working
with scalars.
- Implementation of all basic algebraic functions.
- Smart generalization of integer operators to floating point numbers.
- Extensive set of operators for array manipulation.
- Powerful built-in sequence generators.
- Basic memory management.
- Function declaration and execution with flow control.
Distro packages
For arch linux users, pkgbuild is available in
AUR repository.
For gentoo users, the e-build is in sunrise overlay.
Development
concept and programming:
Simon Čopar
testing, build system and gentoo release maintenance:
Jure Varlec
Send comments, feature requests and bug reports to info.ised(at)gmail.com.