Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rc shell for slackware?

23 views
Skip to first unread message

Mike Small

unread,
Dec 12, 2023, 10:34:40 PM12/12/23
to
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

unread,
Dec 13, 2023, 1:41:24 AM12/13/23
to
On Tue, 12 Dec 2023 22:34:35 -0500, Mike Small wrote:
> 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.

> 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.

> 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

unread,
Dec 13, 2023, 5:41:34 PM12/13/23
to
Henrik Carlqvist <Henrik.C...@deadspam.com> writes:
...
>> 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

unread,
Dec 14, 2023, 4:35:56 AM12/14/23
to
On Tue, 12 Dec 2023 22:34:35 -0500, Mike Small wrote:

> 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 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.

> 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]

> Regards,
> Mike Sm.

-Joe

Mike Small

unread,
Dec 14, 2023, 3:57:42 PM12/14/23
to
Joseph Rosevear <Ma...@JoesLife.org> writes:
...
>> 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

unread,
Dec 14, 2023, 6:20:47 PM12/14/23
to
On Tue, 12 Dec 2023 22:34:35 -0500, Mike Small wrote:

> 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.

> 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

Joseph Rosevear

unread,
Dec 16, 2023, 6:25:19 PM12/16/23
to
On Thu, 14 Dec 2023 15:57:39 -0500, Mike Small wrote:

> 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

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
0 new messages