From christos at zoulas.com Wed Apr 1 00:16:36 2009 From: christos at zoulas.com (Christos Zoulas) Date: Tue, 31 Mar 2009 17:16:36 -0400 Subject: passing dollar-sign to remote tcsh? In-Reply-To: <20090331201627.GB1484@astrouw.edu.pl> from Michal Szymanski (Mar 31, 10:16pm) Message-ID: <20090331211636.56E1756550@rebar.astron.com> On Mar 31, 10:16pm, msz at astrouw.edu.pl (Michal Szymanski) wrote: -- Subject: Re: passing dollar-sign to remote tcsh? | > rsh remhost locate -r \'\\.ext\$\' | | Impressive :) Thanks, Christos. Am I right to think that the idea is to | prevent the local shell from quoting, by adding backslashes to the | surrounding apostrophes? I just protected all the necessary characters with one more level of quoting. The local shell will strip one level of quoting leaving you with: locate -r '\.ext$' which is what you want. christos From vcrhonek at redhat.com Tue Apr 14 14:38:44 2009 From: vcrhonek at redhat.com (Vitezslav Crhonek) Date: Tue, 14 Apr 2009 07:38:44 -0400 (EDT) Subject: [PATCH]$name[selector] breaks rightness of empty range with omitted second argument in range In-Reply-To: <2114920801.4564131239709060804.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Message-ID: <968651721.4564181239709124530.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Hi, This is related to "[PATCH]$name[selector]:it should fail when any number of 'selector' is out of range" thread discussed here roughly a year ago (see http://mx.gw.com/pipermail/tcsh/2008-February/003923.html). The patch breaks $name[selector-] functionality (the second argument is omitted). This situation is described in man page: "It is not an error for a range to be empty if the second argument is omitted or in range.". But with the patch the tcsh produces "argv: Subscript out of range." in this situation. Try: #!/bin/tcsh -f echo $argv[1-] The patch should be reverted or fixed (if you believe that $name[selector] should fail when any number of selector if out of range - I'm not sure, because man page doesn't state it). The patch is part of tarball since tcsh-6.16.00. Best regards, Vitezslav Crhonek