From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net From: =?UTF-8?Q?Maur=C3=ADcio?= CA Date: Sun, 24 Apr 2011 17:05:43 +0000 Message-ID: References: <86wrijennb.fsf@cmarib.ramside> Mime-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.9p1 (Linux) Subject: Re: [9fans] Different results for the same rc script when using listen1 Topicbox-Message-UUID: d3596e62-ead6-11e9-9d60-3106f5b1d025 >> How can running a script throw 'listen1' can get 'rc' to fail an >> 'if' test?!?! > This looks like you're using p9p. Have you checked your PATH? > It might not be finding an executable, or finding the wrong version > of an executable. Sure. Take, for instance, this script uniquely named 'tester.rc': #!/usr/bin/env rc echo -n I am the real tester: ~ $1 $2 I can change 'listen_test.rc' to use it: #!/usr/bin/env rc for (i in `{seq 1 5}){ if (./tester.rc $i 3) { echo ' ' $i equals 3 } if not echo ' ' $i is different from 3 } Now I get: $./listen_test.rc I am the real tester: 1 is different from 3 I am the real tester: 2 is different from 3 I am the real tester: 3 equals 3 I am the real tester: 4 is different from 3 I am the real tester: 5 is different from 3 But: $listen1 'tcp!localhost!8080' ./listen_test.rc & $dial -e 'tcp!localhost!8080' I am the real tester: 1 equals 3 I am the real tester: 2 equals 3 I am the real tester: 3 equals 3 I am the real tester: 4 equals 3 I am the real tester: 5 equals 3 Thanks, MaurĂ­cio