9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] molesting the acme filesystem
@ 2006-07-14  1:24 David Leimbach
  2006-07-14  2:54 ` quanstro
  0 siblings, 1 reply; 14+ messages in thread
From: David Leimbach @ 2006-07-14  1:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'm trying to set /mnt/acme/acme/addr via a regular expression,
however the following does not work:

echo /text/ > /mnt/acme/acme/addr

The man page says I can use regular expressions like I do with "Edit"
and that seems to work fine with Edit, so I'm not sure what I'm doing
wrong exactly.

Dave


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14  1:24 [9fans] molesting the acme filesystem David Leimbach
@ 2006-07-14  2:54 ` quanstro
  2006-07-14  5:12   ` David Leimbach
  0 siblings, 1 reply; 14+ messages in thread
From: quanstro @ 2006-07-14  2:54 UTC (permalink / raw)
  To: 9fans

echo -n /text/ >/mnt/acme/acme/addr

- erik

On Thu Jul 13 20:24:31 CDT 2006, leimy2k@gmail.com wrote:
> I'm trying to set /mnt/acme/acme/addr via a regular expression,
> however the following does not work:
>
> echo /text/ > /mnt/acme/acme/addr
>
> The man page says I can use regular expressions like I do with "Edit"
> and that seems to work fine with Edit, so I'm not sure what I'm doing
> wrong exactly.
>
> Dave


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [9fans] molesting the acme filesystem
  2006-07-14  2:54 ` quanstro
@ 2006-07-14  5:12   ` David Leimbach
  2006-07-14 12:07     ` quanstro
  0 siblings, 1 reply; 14+ messages in thread
From: David Leimbach @ 2006-07-14  5:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hmm somehow I missed that this one doesn't take newlines... Thanks!

Dave

On 7/13/06, quanstro@quanstro.net <quanstro@quanstro.net> wrote:
> echo -n /text/ >/mnt/acme/acme/addr
>
> - erik
>
> On Thu Jul 13 20:24:31 CDT 2006, leimy2k@gmail.com wrote:
> > I'm trying to set /mnt/acme/acme/addr via a regular expression,
> > however the following does not work:
> >
> > echo /text/ > /mnt/acme/acme/addr
> >
> > The man page says I can use regular expressions like I do with "Edit"
> > and that seems to work fine with Edit, so I'm not sure what I'm doing
> > wrong exactly.
> >
> > Dave
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [9fans] molesting the acme filesystem
  2006-07-14  5:12   ` David Leimbach
@ 2006-07-14 12:07     ` quanstro
  2006-07-14 16:46       ` Lyndon Nerenberg
  0 siblings, 1 reply; 14+ messages in thread
From: quanstro @ 2006-07-14 12:07 UTC (permalink / raw)
  To: 9fans

i'm not sure why acme and other plan9 filesystems typically disallow a trailing newline
on input and don't provide one on output.  for example

	cat /mnt/acme/acme/[0-9]*/ctl

doesn't do what you want; you need this instead

	for(i in /mnt/acme/acme/[0-9]*/ctl){
		cat $i
		echo
	}

- erik


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [9fans] molesting the acme filesystem
  2006-07-14 12:07     ` quanstro
@ 2006-07-14 16:46       ` Lyndon Nerenberg
  2006-07-14 17:30         ` Ronald G Minnich
  2006-07-14 17:35         ` David Leimbach
  0 siblings, 2 replies; 14+ messages in thread
From: Lyndon Nerenberg @ 2006-07-14 16:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, 14 Jul 2006, quanstro@quanstro.net wrote:

> i'm not sure why acme and other plan9 filesystems typically disallow a trailing newline
> on input and don't provide one on output.

Yup.  This one is my top entry for the confusomatic contest.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 17:30         ` Ronald G Minnich
@ 2006-07-14 17:29           ` quanstro
  2006-07-14 17:48             ` Ronald G Minnich
  2006-07-14 17:36           ` David Leimbach
  1 sibling, 1 reply; 14+ messages in thread
From: quanstro @ 2006-07-14 17:29 UTC (permalink / raw)
  To: 9fans

you might be right.  but i'm not sure.

is there a good argument for having 'echo fu' return an error, but
'echo -n fu' work?

also, when reading from such a file, it's usually problematic not to
have a newline for shell scripts while it is much easier to remove
an extra newline in c.  globbing doesn't do the right thing without
newlines; you have to write a for loop instead.

what case am i missing?

- erik

On Fri Jul 14 12:32:53 CDT 2006, rminnich@lanl.gov wrote:
>
> I think if there were a newline, we'd all have scripts called 'chop' for
> removing it. I don't think there's a perfect answer here.
>
> ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 16:46       ` Lyndon Nerenberg
@ 2006-07-14 17:30         ` Ronald G Minnich
  2006-07-14 17:29           ` quanstro
  2006-07-14 17:36           ` David Leimbach
  2006-07-14 17:35         ` David Leimbach
  1 sibling, 2 replies; 14+ messages in thread
From: Ronald G Minnich @ 2006-07-14 17:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Lyndon Nerenberg wrote:
> On Fri, 14 Jul 2006, quanstro@quanstro.net wrote:
>
>> i'm not sure why acme and other plan9 filesystems typically disallow a
>> trailing newline
>> on input and don't provide one on output.
>
>
> Yup.  This one is my top entry for the confusomatic contest.

I think if there were a newline, we'd all have scripts called 'chop' for
removing it. I don't think there's a perfect answer here.

ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 17:37             ` Ronald G Minnich
@ 2006-07-14 17:33               ` quanstro
  2006-07-14 17:44               ` David Leimbach
  1 sibling, 0 replies; 14+ messages in thread
From: quanstro @ 2006-07-14 17:33 UTC (permalink / raw)
  To: 9fans

example?

- erik

On Fri Jul 14 12:41:13 CDT 2006, rminnich@lanl.gov wrote:
> David Leimbach wrote:
> > some of them are clearly inserting newlines, like event and they
> > require one as well to be a completed "event".
>
> maybe I misunderstood if you're just talking acme.
>
> But for the system as a whole, there are mnay places where a gratuitious
> \n would add a lot of mess.
>
>
> ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: Re: [9fans] molesting the acme filesystem
  2006-07-14 16:46       ` Lyndon Nerenberg
  2006-07-14 17:30         ` Ronald G Minnich
@ 2006-07-14 17:35         ` David Leimbach
  1 sibling, 0 replies; 14+ messages in thread
From: David Leimbach @ 2006-07-14 17:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/14/06, Lyndon Nerenberg <lyndon@orthanc.ca> wrote:
> On Fri, 14 Jul 2006, quanstro@quanstro.net wrote:
>
> > i'm not sure why acme and other plan9 filesystems typically disallow a trailing newline
> > on input and don't provide one on output.
>
> Yup.  This one is my top entry for the confusomatic contest.
>

/dev/acme/event seems to provide one on output and requires one for
the input to be valid.

However, as was seen, I couldn't provide one to "addr".

The interface seems a bit inconsistent based on my current knowledge
but I enjoyed running through xfid.c and seeing how that was all
parsed out all the same.

I think maybe the man page should be more specific about some of this
stuff, I may fix it and get a patch in for it over the weekend.

Looks like the site's back up.  Glad to see that :-)

Dave


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [9fans] molesting the acme filesystem
  2006-07-14 17:30         ` Ronald G Minnich
  2006-07-14 17:29           ` quanstro
@ 2006-07-14 17:36           ` David Leimbach
  2006-07-14 17:37             ` Ronald G Minnich
  1 sibling, 1 reply; 14+ messages in thread
From: David Leimbach @ 2006-07-14 17:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/14/06, Ronald G Minnich <rminnich@lanl.gov> wrote:
> Lyndon Nerenberg wrote:
> > On Fri, 14 Jul 2006, quanstro@quanstro.net wrote:
> >
> >> i'm not sure why acme and other plan9 filesystems typically disallow a
> >> trailing newline
> >> on input and don't provide one on output.
> >
> >
> > Yup.  This one is my top entry for the confusomatic contest.
>
> I think if there were a newline, we'd all have scripts called 'chop' for
> removing it. I don't think there's a perfect answer here.
>
> ron
>
But some of them are clearly inserting newlines, like event and they
require one as well to be a completed "event".

I don't care about perfection as much as I do about consistency (and
that it works... it could have just been consistently broken too I
suppose) :-)

Dave


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 17:36           ` David Leimbach
@ 2006-07-14 17:37             ` Ronald G Minnich
  2006-07-14 17:33               ` quanstro
  2006-07-14 17:44               ` David Leimbach
  0 siblings, 2 replies; 14+ messages in thread
From: Ronald G Minnich @ 2006-07-14 17:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

David Leimbach wrote:
> some of them are clearly inserting newlines, like event and they
> require one as well to be a completed "event".

maybe I misunderstood if you're just talking acme.

But for the system as a whole, there are mnay places where a gratuitious
\n would add a lot of mess.


ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 17:48             ` Ronald G Minnich
@ 2006-07-14 17:43               ` quanstro
  0 siblings, 0 replies; 14+ messages in thread
From: quanstro @ 2006-07-14 17:43 UTC (permalink / raw)
  To: 9fans

that's kind of my point; rc will eat the newline:

	; c=`{cat '#r/rtc'}
	; whatis c
	c=1152880896

that notwithstanding, you're probablly right about the extra newlines.

- erik

On Fri Jul 14 12:51:14 CDT 2006, rminnich@lanl.gov wrote:
> quanstro@quanstro.net wrote:
>
> > what case am i missing?
>
> The one I am thinking of is something like
> c=`{cat '#r/rtc'}
>
> where you probably don't want that newline. This is a common type of
> thing for me.
>
> ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [9fans] molesting the acme filesystem
  2006-07-14 17:37             ` Ronald G Minnich
  2006-07-14 17:33               ` quanstro
@ 2006-07-14 17:44               ` David Leimbach
  1 sibling, 0 replies; 14+ messages in thread
From: David Leimbach @ 2006-07-14 17:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/14/06, Ronald G Minnich <rminnich@lanl.gov> wrote:
> David Leimbach wrote:
> > some of them are clearly inserting newlines, like event and they
> > require one as well to be a completed "event".
>
> maybe I misunderstood if you're just talking acme.
>
> But for the system as a whole, there are mnay places where a gratuitious
> \n would add a lot of mess.
>
>
> ron
>

Oh I'm not saying I disagree with you :-).  I'm just saying that
things aren't necessarily consistent or always very self similar.  The
interface is, I mean, it's all files, and there's some definite beauty
there.

Dave


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] molesting the acme filesystem
  2006-07-14 17:29           ` quanstro
@ 2006-07-14 17:48             ` Ronald G Minnich
  2006-07-14 17:43               ` quanstro
  0 siblings, 1 reply; 14+ messages in thread
From: Ronald G Minnich @ 2006-07-14 17:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

quanstro@quanstro.net wrote:

> what case am i missing?

The one I am thinking of is something like
c=`{cat '#r/rtc'}

where you probably don't want that newline. This is a common type of
thing for me.

ron


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-07-14 17:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-14  1:24 [9fans] molesting the acme filesystem David Leimbach
2006-07-14  2:54 ` quanstro
2006-07-14  5:12   ` David Leimbach
2006-07-14 12:07     ` quanstro
2006-07-14 16:46       ` Lyndon Nerenberg
2006-07-14 17:30         ` Ronald G Minnich
2006-07-14 17:29           ` quanstro
2006-07-14 17:48             ` Ronald G Minnich
2006-07-14 17:43               ` quanstro
2006-07-14 17:36           ` David Leimbach
2006-07-14 17:37             ` Ronald G Minnich
2006-07-14 17:33               ` quanstro
2006-07-14 17:44               ` David Leimbach
2006-07-14 17:35         ` David Leimbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).