Recently I play with an awesome programming language red. After I downloaded it on my Linux Box, and typed red --version
, I got something unexpected:
$ red --version
GNU ed version 0.2
then I look up ed's manual, it's said it also named red
, but don't explain why?
So does anyone know the secret history of ed's name, maybe it's a wonderful story. ;-)
Read GNU ed documentation, chapter on invoking ed. Running red
is like running ed -r
i.e. running it in ....
-r
--restricted
Run in restricted mode. This mode disables edition of files out of
the current directory and execution of shell commands.
BTW, bash
(and several other utilities) have a restricted mode also, e.g. when invoked as rbash
....
And GNU ed manual says
A restricted version of ed, red, can only edit files in the current directory and cannot execute shell commands.
BTW, perhaps your red
compiler got installed at some different path like /usr/local/bin/red
. Try typing this (or some similar) path in full to invoke it. Learn about the role of PATH
e.g. in environ(7) and execvp(3) etc... Perhaps edit your .bashrc
to change your PATH
or add a symlink from $HOME/bin/red
to e.g. /usr/local/bin/red