From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <23342e9a00ff47ea7e567339fec7e693@tombob.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] question about wildcard expansion in RC Date: Tue, 28 Nov 2006 10:08:28 +0000 From: Robert Raschke In-Reply-To: <95dfc7de0611271028m7cadc3y7a7931dc5c107dfd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: e7a6408e-ead1-11e9-9d60-3106f5b1d025 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".