9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] question about wildcard expansion in RC
@ 2006-11-27 18:28 Myron Cheung
  2006-11-27 19:16 ` Richard Miller
  2006-11-28 10:08 ` Robert Raschke
  0 siblings, 2 replies; 5+ messages in thread
From: Myron Cheung @ 2006-11-27 18:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

>From within a terminal, I type:

% echo (/dev/sdC0)
/dev/sdC0

% echo (/dev/sdC*)
/dev/sdC0 /dev/sdC0


% test -f /dev/sd*/swap
test: unexpected operator/operand: /dev/sdC0/swap



Older versions of 'test' do not complain about the unexpected
operator/operand and worked in termrc.  But the recent version of "test"
fails, as a result, the swap partition is not mounted.

/Myron

[-- Attachment #2: Type: text/html, Size: 450 bytes --]

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

* Re: [9fans] question about wildcard expansion in RC
  2006-11-27 18:28 [9fans] question about wildcard expansion in RC Myron Cheung
@ 2006-11-27 19:16 ` Richard Miller
  2006-11-27 20:08   ` Myron Cheung
  2006-11-28 10:08 ` Robert Raschke
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Miller @ 2006-11-27 19:16 UTC (permalink / raw)
  To: 9fans

> Older versions of 'test' do not complain about the unexpected
> operator/operand and worked in termrc.  But the recent version of "test"
> fails, as a result, the swap partition is not mounted.

Google for 'test.command.is.broken' and you'll see this has been reported
before.  It would be a good idea to revert to the pre-12-August version
of test, which was much less broken.

I think /dev/sdC0 appears twice because it's bound into /dev once as
part of the boot process, and again by termrc.  This would be harmless
without the 'test' bug.



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

* Re: [9fans] question about wildcard expansion in RC
  2006-11-27 19:16 ` Richard Miller
@ 2006-11-27 20:08   ` Myron Cheung
  0 siblings, 0 replies; 5+ messages in thread
From: Myron Cheung @ 2006-11-27 20:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Thanks for your google tip.  I saw your initial bug report.

On 11/27/06, Richard Miller <9fans@hamnavoe.com> wrote:
>
> > Older versions of 'test' do not complain about the unexpected
> > operator/operand and worked in termrc.  But the recent version of "test"
> > fails, as a result, the swap partition is not mounted.
>
> Google for 'test.command.is.broken' and you'll see this has been reported
> before.  It would be a good idea to revert to the pre-12-August version
> of test, which was much less broken.
>
> I think /dev/sdC0 appears twice because it's bound into /dev once as
> part of the boot process, and again by termrc.  This would be harmless
> without the 'test' bug.
>
>

[-- Attachment #2: Type: text/html, Size: 1036 bytes --]

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

* Re: [9fans] question about wildcard expansion in RC
  2006-11-27 18:28 [9fans] question about wildcard expansion in RC Myron Cheung
  2006-11-27 19:16 ` Richard Miller
@ 2006-11-28 10:08 ` Robert Raschke
  2006-11-28 14:40   ` Myron Cheung
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Raschke @ 2006-11-28 10:08 UTC (permalink / raw)
  To: 9fans

Myron wrote:
>From within a terminal, I type:
>
> % echo (/dev/sdC0)
> /dev/sdC0
>
> % echo (/dev/sdC*)
> /dev/sdC0 /dev/sdC0
>
>
> % test -f /dev/sd*/swap
> test: unexpected operator/operand: /dev/sdC0/swap
>
>
>
> Older versions of 'test' do not complain about the unexpected
> operator/operand and worked in termrc.  But the recent version of "test"
> fails, as a result, the swap partition is not mounted.
>

I got this a while back as well, and decided to rewrite that part of my termrc/cpurc:

	disk=''
	for(d in /dev/sd??)
		if(~ $disk '')
			if(test -f $d/swap)
				disk=`{ls /dev/sd*/swap >[2]/dev/null | sed 1q | sed 's!swap$!!'}
	if(! ~ $disk '')
		swap $disk^swap >/dev/null >[2=1]


Robby

--
"Weg damit" is german for "get rid of this".




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

* Re: [9fans] question about wildcard expansion in RC
  2006-11-28 10:08 ` Robert Raschke
@ 2006-11-28 14:40   ` Myron Cheung
  0 siblings, 0 replies; 5+ messages in thread
From: Myron Cheung @ 2006-11-28 14:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

I updated my system last night with "pull", and the test.c program has been
fixed.

/Myron

On 11/28/06, Robert Raschke <r.raschke@tombobwegdamit.com> wrote:
>
> Myron wrote:
> >From within a terminal, I type:
> >
> > % echo (/dev/sdC0)
> > /dev/sdC0
> >
> > % echo (/dev/sdC*)
> > /dev/sdC0 /dev/sdC0
> >
> >
> > % test -f /dev/sd*/swap
> > test: unexpected operator/operand: /dev/sdC0/swap
> >
> >
> >
> > Older versions of 'test' do not complain about the unexpected
> > operator/operand and worked in termrc.  But the recent version of "test"
> > fails, as a result, the swap partition is not mounted.
> >
>
> I got this a while back as well, and decided to rewrite that part of my
> termrc/cpurc:
>
>         disk=''
>         for(d in /dev/sd??)
>                 if(~ $disk '')
>                         if(test -f $d/swap)
>                                 disk=`{ls /dev/sd*/swap >[2]/dev/null |
> sed 1q | sed 's!swap$!!'}
>         if(! ~ $disk '')
>                 swap $disk^swap >/dev/null >[2=1]
>
>
> Robby
>
> --
> "Weg damit" is german for "get rid of this".
>
>
>

[-- Attachment #2: Type: text/html, Size: 2096 bytes --]

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

end of thread, other threads:[~2006-11-28 14:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-27 18:28 [9fans] question about wildcard expansion in RC Myron Cheung
2006-11-27 19:16 ` Richard Miller
2006-11-27 20:08   ` Myron Cheung
2006-11-28 10:08 ` Robert Raschke
2006-11-28 14:40   ` Myron Cheung

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