Re: [dev] [9base] /bin/rc

From: Ethan Grammatikidis <>
Date: Thu, 26 Aug 2010 12:44:51 +0100

On 2010-08-25 11:04:13 +0100 Kris Maglione <>

> On Wed, Aug 25, 2010 at 02:51:07AM +0100, Ethan Grammatikidis wrote:
>> I never thought of keeping a copy of rc in /bin. What I came up with
>> was an
>> rc+ed script to modify that first line.[1] It itself launches with
>> /usr/bin/env, but it modifies every rc and awk script it finds
>> except
>> itself so that the #! lines reference the rc and awk which were in
>> the path
>> at the time it was run. That sounds complicated...
>> Basically, run it in a dir with rc and/or awk scripts and the rc and
>> awk
>> you want to use in dirs at the head of path. It will fix the #!
>> lines. It
>> searches recursively too. I've used it to fix plan9port itself after
>> a
>> move, which p9p's own INSTALL won't do.
> My main motive was that I wanted most of my scripts to run on Plan 9
> as well
> as my BSD/Linux systems without any hassle. At any rate, I'd rather
> have a
> shebang line that works everywhere than a script that modifies them
> all,
> especially since my scripts tend to either live on a network
> filesystem or
> move around a lot via rsync or hg.

Oh, yeah, fair enough! Despite having my #!-fixer I've made sure to
keep my p9p install in a consistent place across several recent
changes, although I'm sure that isn't always possible. It's under
/data actually, which is basically my home dir, leaving $HOME itself
for dotfiles and the downloads dir.
Received on Thu Aug 26 2010 - 13:44:51 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 26 2010 - 13:48:02 CEST