From: "Mathew Yeates" <mat.yeates@gmail.com>
To: gdb@sourceware.org
Subject: capturing command output to a variable
Date: Sun, 11 Jan 2009 21:23:00 -0000 [thread overview]
Message-ID: <7d0c05ac0901111323u61269393vcf0c2f5fb3b5b955@mail.gmail.com> (raw)
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
next reply other threads:[~2009-01-11 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 21:23 Mathew Yeates [this message]
2009-01-11 22:38 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d0c05ac0901111323u61269393vcf0c2f5fb3b5b955@mail.gmail.com \
--to=mat.yeates@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox