Discussion:
rc shell for slackware?
(too old to reply)
Mike Small
2023-12-13 03:34:35 UTC
Permalink
Hello,

Do any of you like the rc shell (Tom Duff's shell / the plan 9 shell)?
For scripting, I've come to prefer it to the Bourne shell and its modern
"expansion sets."

Until recently upgrading to 15 and making Slackware my primary system
again, I'd used the pkgsrc version on NetBSD, a port with a small number
of extensions for Unix-like systems based largely on work by Byron
Rakitzis:
https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/rc/index.html
Not sure its exact provenance, but the rc shell in Debian and Ubuntu
seems similar.

What do people on Slackware use? I had rc from pkgsrc on Slackware in
14.2, but with 15 not yet feeling stale to me, I've wiped away all of
pkgsrc on Slackware and intend to use base + slackbuilds + some limited
number of local builds. It looks like I once pulled down plan9port,
which continues to run despite the upgrade, so for now I've adjusted my
scripts to work with its rc, a more pure plan 9 rc. That might be how
they stay.

But I'm curious if there are rc enthusiasts here, what you prefer? There
does not seem to be a slackbuild for it unless I've missed it. Was
almost going to suggest it in the requests for 15.1 thread in that other
place, but, I dunno, not sure how that'd go over or quite what I'd be
asking for and why. Though it is a nuisance to have scripts not run
until you pull in external things.

I see now there was also an es shell for inferno and that also had other
versions including one written in C++ named xs. Is that something worth
checking out? Or is this one of those cases like that expressed by the
idea that Version 6 Unix was an improvement over its successors?

Regards,
Mike Sm.
Henrik Carlqvist
2023-12-13 06:41:20 UTC
Permalink
Post by Mike Small
Do any of you like the rc shell (Tom Duff's shell / the plan 9 shell)?
For scripting, I've come to prefer it to the Bourne shell and its modern
"expansion sets."
No, before this post I hadn't even heard about rc shell. The closest
thing that I have used is probably tcsh which also is a more C-like shell
than sh or bash, but its syntax seems to differ slightly from rc shell.
However, later, mostly I prefer bash shell scripting before tcsh even
though I use tcsh for interactive shell.
Post by Mike Small
But I'm curious if there are rc enthusiasts here, what you prefer?
When tcsh or bash are not enough for my scripting purposes I usually
instead write the script in php which can be used as a powerful scripting
language with built in support for things like sql, snmp and ldap.
Post by Mike Small
There does not seem to be a slackbuild for it unless I've missed it.
If you really like rc and would like to see a more widespread use among
Slackware users a contribution of a SlackBuild script to slackbuilds.org
might be a good start.

regards Henrik
Mike Small
2023-12-13 22:41:30 UTC
Permalink
Henrik Carlqvist <***@deadspam.com> writes:
...
Post by Henrik Carlqvist
Post by Mike Small
There does not seem to be a slackbuild for it unless I've missed it.
If you really like rc and would like to see a more widespread use among
Slackware users a contribution of a SlackBuild script to slackbuilds.org
might be a good start.
Yes, one of these days I'd like to contribute some kind of slackbuild.
Maybe this would be the one to try.
Joseph Rosevear
2023-12-14 09:35:53 UTC
Permalink
Post by Mike Small
Hello,
Do any of you like the rc shell (Tom Duff's shell / the plan 9 shell)?
For scripting, I've come to prefer it to the Bourne shell and its modern
"expansion sets."
Until recently upgrading to 15 and making Slackware my primary system
again, I'd used the pkgsrc version on NetBSD, a port with a small number
of extensions for Unix-like systems based largely on work by Byron
https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/rc/index.html
Not sure its exact provenance, but the rc shell in Debian and Ubuntu
seems similar.
What do people on Slackware use?
I use Bash, of course. However, I have invented a combination of
scripts, functions and C executables, which "works magic" when invoked
like this:

/mnt/joe_root/begin

You can read about it here:

https://rosevearsoftware.com/products/sam/

Essentially, augments Bash, but that is a lame description.
Post by Mike Small
I had rc from pkgsrc on Slackware in
14.2, but with 15 not yet feeling stale to me, I've wiped away all of
pkgsrc on Slackware and intend to use base + slackbuilds + some limited
number of local builds. It looks like I once pulled down plan9port,
which continues to run despite the upgrade, so for now I've adjusted my
scripts to work with its rc, a more pure plan 9 rc. That might be how
they stay.
Good luck with rc. It sounds interesting, perhaps. Different, anyway.

[snip]
Post by Mike Small
Regards,
Mike Sm.
-Joe
Mike Small
2023-12-14 20:57:39 UTC
Permalink
Joseph Rosevear <***@JoesLife.org> writes:
...
Post by Joseph Rosevear
Post by Mike Small
which continues to run despite the upgrade, so for now I've adjusted my
scripts to work with its rc, a more pure plan 9 rc. That might be how
they stay.
Good luck with rc. It sounds interesting, perhaps. Different, anyway.
To give people an idea of what I like in rc, it's that for the simple
scripts I tend to write I've been able to write them only referring to
the man page, starting at a level of no rc knowledge. This is the
length of the man page:

https://manpages.debian.org/bookworm/9base/rc.1plan9.en.html

Okay, one time I had to look in the rc paper's examples to find how to
do `read' in rc: http://doc.cat-v.org/plan_9/4th_edition/papers/rc
And perhaps I read that paper through before I read the man page and started
making scripts. But I have a whole book on ksh scripting: The New Korn
Shell by Bolsky and Korn. Yet reading through much of that and years of
practice leaves me still a pretty poor sh-er.

Not trying to convert everyone to rc, but there's a simple kind of
satisfaction to writing in it if you don't have complex needs (or
perhaps if you do, I dunno).
Joseph Rosevear
2023-12-16 23:25:15 UTC
Permalink
Post by Mike Small
To give people an idea of what I like in rc, it's that for the simple
scripts I tend to write I've been able to write them only referring to
the man page, starting at a level of no rc knowledge. This is the length
https://manpages.debian.org/bookworm/9base/rc.1plan9.en.html
Sure, if it works for you, then go for it.

I'm heavily invested in Bash. I'm thankful, however, (Thank you!) for
your mention of the rc shell. I try to keep my eyes open and learn when
I can.

-Joe

Joseph Rosevear
2023-12-14 23:20:44 UTC
Permalink
Post by Mike Small
Do any of you like the rc shell (Tom Duff's shell / the plan 9 shell)?
I didn't know what it was, although after reading your post I looked it
up online.
Post by Mike Small
What do people on Slackware use?
Well, I use Bash. Tastes great, less filling!

Seriously, it does what I need, but only after augmenting the available
command set by altering the PATH and the environment to include a special
set of scripts, executables, and functions.

I do this alteration by running a script that lives on a flashdrive, like
this:

/mnt/joe_root/begin

-Joe
Loading...