From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23835 invoked by alias); 16 Dec 2009 03:58:00 -0000 Received: (qmail 23825 invoked by uid 22791); 16 Dec 2009 03:57:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f175.google.com (HELO mail-px0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Dec 2009 03:57:52 +0000 Received: by pxi5 with SMTP id 5so408117pxi.12 for ; Tue, 15 Dec 2009 19:57:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.26.32 with SMTP id d32mr307407wfj.297.1260935871083; Tue, 15 Dec 2009 19:57:51 -0800 (PST) In-Reply-To: References: <20091211100558.GA7125@adacore.com> From: Hui Zhu Date: Wed, 16 Dec 2009 03:58:00 -0000 Message-ID: Subject: Re: [RFC] Let "gcore" command accept a suffix argument To: tromey@redhat.com Cc: Joel Brobecker , Michael Snyder , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00200.txt.bz2 On Wed, Dec 16, 2009 at 03:20, Tom Tromey wrote: >>>>>> ">" =3D=3D Hui Zhu writes: > >>> Agree with you. =A0Add " with variable make it oddness. >>> What about change it to others, like: >>> eval echo {++$a} > >>> Or add " to simple string, like: >>> eval echo ++$a".core" >>> Or >>> eval echo ++$a'.core' > > What do you think of the idea of making it printf-like? It's not bad. But need a lot of extend work that the old patch don't have. And this command doesn't need convert a value from 1 type to another. So I want use the "" way. > > Some other approach, like the above two, would be ok with me, provided > that quoting is treated properly -- it should be possible to write any > command using eval. =A0So, there must be some way to quote whatever > special characters are used by eval. > If use "" the point the normail string, just the " and \ are the special characters. If we want add " in normal string. Use \" If we want add / in normal string. Use \\ Do you think it's OK? Thanks, Hui