From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25993 invoked by alias); 3 Oct 2014 14:42:23 -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: 19208 Received: (qmail 26868 invoked from network); 3 Oct 2014 14:42:08 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IB6aG78ksPINAkgNGJ33JfFFXAQs8Y7Hocfc9wgd2Uw=; b=fvTd23ovYwlv0ydv+5v/NgaX/nK8d/tkkhl5u+/413VfaY/t80fpaFtLGcqCtnVdJd VRTID/6LlvllHKUyXkeqcOfGtBm+CBOvaifAbyROm3mX+e2QcE00EUZAuwk9qsAV8cuE 2ZKYCOuozVj6Q2/2jMwGIfJzw+1l+re8WZwAq5w3TM5QDHNGSMBNH4bmOQ1mf2pYA7HJ d3nPTB5DcRG0Uz6kklKofrftXo9ELwI+/HCKP10xiRiw65LcxqaHN+CB2J5n7Xk3P2N8 s6/8llCrycH0OZBfidWGLFDiv6Q1DMWADYEtptDc9VxLsxpY3p30hzyzFAm9QfJp0U/X cPsg== MIME-Version: 1.0 X-Received: by 10.50.164.167 with SMTP id yr7mr14727860igb.37.1412347320695; Fri, 03 Oct 2014 07:42:00 -0700 (PDT) In-Reply-To: <1412259225.3798.0@numa-i> References: <1412259225.3798.0@numa-i> Date: Fri, 3 Oct 2014 16:42:00 +0200 Message-ID: Subject: Re: piping question From: Mikael Magnusson To: Helmut Jarausch Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 2 October 2014 16:13, Helmut Jarausch wrote: > Hi, > > I have a command 'most' which is similar to 'less'. > Now I'd like to write a shell script 'xmost' which > should do the same as 'most' but with its output sent to a newly > generated xterm. > > If I say > > xterm -g 180x30+0+0 -hold -e most > > I cannot pipe into it anymore, like > > ls -l | xmost > > Can this be achieved? > > Many thanks for a hint, > Helmt. echo hi there | { xterm -e 'most <& 7' 7< <(cat) } I forget the syntax right now for allocating an appropriate free fd, but 7 should be free most of the time ;) It might also be possibly to use some 7<&1 thing to avoid the extra cat, but 7<&1 isn't it. -- Mikael Magnusson