Reputation: 182
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. ;-)
Upvotes: 3
Views: 293
Reputation: 580
The same happened to me a while ago, and it thought that Red had been packaged for my favourite Debian! Hélas, not.
I noted that the "red" executable belonging to ed package is /only a symlink to ed, at least on my debian:
# pierre@autan: ~ < 2013_10_13__12_16_23 >
ll /usr/bin/red
lrwxrwxrwx 1 root root 7 mai 12 19:10 /usr/bin/red -> /bin/ed
This leads to a point that I brought, a few months ago: I find that the name "Red" is a bit too general, and may be confusing. WHile googling "rebol" leads to many relevant matches, googling "red" leads to a tremendous amount of irrelevant stuff. However, as @DocKimbel (Red's author) pointed out, googling "red language" immediately leads to relevant URLs.
Now, what to do:
Note that the first option is about programming: the future of Red, which is coming to life right now, depends on these kind of "details", and it concerns all programmers who will be coding in Red soon (plenty!;)). The second option is not about programming at all: mea culpa.
As @HostileFork pointed out on https://chat.stackoverflow.com/rooms/291/rebol-and-red , ed is quite an old-fashioned tool: I suppose it must be still /only used by some scripts, and not that much by "normally-minded" human beings.
(I drifted a bit off-opic, didn't I? Sorry...)
Upvotes: 1
Reputation: 1
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
Upvotes: 2