From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: How to get the output of a command? Date: Fri, 21 Nov 2014 17:17:50 +0100 Message-ID: <87389cr2tb.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416586708 28894 80.91.229.3 (21 Nov 2014 16:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 16:18:28 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 17:18:23 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xrquc-00073e-UY for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 17:18:23 +0100 Original-Received: from localhost ([::1]:41334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrquc-00053y-D0 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 11:18:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrquL-00053r-RQ for help-gnu-emacs@gnu.org; Fri, 21 Nov 2014 11:18:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrquG-0004nZ-6l for help-gnu-emacs@gnu.org; Fri, 21 Nov 2014 11:18:05 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:43669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrquF-0004n8-W3 for help-gnu-emacs@gnu.org; Fri, 21 Nov 2014 11:18:00 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 9520F42067 for ; Fri, 21 Nov 2014 17:17:57 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eEJjJ0cdZ6fo for ; Fri, 21 Nov 2014 17:17:57 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 68FF542066 for ; Fri, 21 Nov 2014 17:17:57 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101108 Archived-At: Hello there, I'd like to run some shell command and then receive its output *as the value of some expression*. IOW, I'd like to do this: (setq output (do-magic "echo Whatever")) so that `output's value is the string "Whatever". What should I put in place of do-magic? I skimmed through the manual section on processes, but I suspect there might be some simple way... Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University