From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24732 invoked by alias); 11 Jan 2009 21:23:39 -0000 Received: (qmail 24724 invoked by uid 22791); 11 Jan 2009 21:23:38 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Jan 2009 21:23:03 +0000 Received: by wf-out-1314.google.com with SMTP id 28so12172056wfc.24 for ; Sun, 11 Jan 2009 13:23:01 -0800 (PST) Received: by 10.142.103.2 with SMTP id a2mr11792840wfc.164.1231708981325; Sun, 11 Jan 2009 13:23:01 -0800 (PST) Received: by 10.142.12.20 with HTTP; Sun, 11 Jan 2009 13:23:01 -0800 (PST) Message-ID: <7d0c05ac0901111323u61269393vcf0c2f5fb3b5b955@mail.gmail.com> Date: Sun, 11 Jan 2009 21:23:00 -0000 From: "Mathew Yeates" To: gdb@sourceware.org Subject: capturing command output to a variable MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00051.txt.bz2 I understand that turning on logging will allow me to save command output to a file. But what if I want to save the output in a convenience variable?? e.g. How can I do something like the following where I capture the out of the "where" command. set $x = `where 1` echo $x Mathew