Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: piping question
- X-seq: zsh-users 19208
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: piping question
- Date: Fri, 3 Oct 2014 16:42:00 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <1412259225.3798.0@numa-i>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1412259225.3798.0@numa-i>
On 2 October 2014 16:13, Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author