From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17647 invoked by alias); 21 Jan 2013 20:12:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17597 Received: (qmail 13605 invoked from network); 21 Jan 2013 20:12:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.179 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=ydWIW2CO2IgTRu3wPZrIF+iRGu/Zb92wg/kZvWg5T4A=; b=jHs+hdCWSs+Tj7O29J9ws1GWLhMg+jMWJ4+CkFZAWZynphENVm60OJKHcC2AooW87m NEXlNZ+TkAG7YQ+15sZ4Q1rwY7RAz1qDqkS6zjPSv3oxcOKq+zXXVWnhBKGQXPKfDxoJ 2IapOaSafM4YcIj+Sz1z1/919MFyTcJu+/7oEM6PexQ0SRCOlw3QIbAqKg3H1wIqIdyg YFRdOCrzF5Cbd4I8Ki0a36fR8nWkqDnf0GkP54knCwaRivYIcX0+GqII8rntl64F2B53 g8lUm9vijX3UhRpFHxJjxh3sT1Xoasc02ZcXIjwKItvxrl7mPpOmOUUom4tFMW6E7BhJ MxRg== MIME-Version: 1.0 X-Received: by 10.50.151.211 with SMTP id us19mr10114833igb.84.1358799118167; Mon, 21 Jan 2013 12:11:58 -0800 (PST) Date: Tue, 22 Jan 2013 01:41:57 +0530 Message-ID: Subject: Capture stderr to variable without new process From: rahul To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=e89a8f3b9d5fc26e0104d3d2120f --e89a8f3b9d5fc26e0104d3d2120f Content-Type: text/plain; charset=UTF-8 I guess the typical way would be: ERR=$(popd 2>&1) However, the command cannot run in a sub-shell as it would have no effect in the current shell. Is writing to a file the only way ? -- rahul --e89a8f3b9d5fc26e0104d3d2120f--