From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2472 invoked by alias); 20 Apr 2016 02:12:19 -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: 21457 Received: (qmail 3193 invoked from network); 20 Apr 2016 02:12:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: zsh-users@zsh.org To: zsh-users@zsh.org From: Emanuel Berg Subject: Re: virtual files? Date: Wed, 20 Apr 2016 02:12:05 +0000 Message-ID: <87zispqb9m.fsf@student.uu.se> References: <8760vdrt5y.fsf@student.uu.se> <1302351461115632@web4o.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-9ce1e655.08-680-7570702.cust.bredbandsbolaget.se User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Mail-Copies-To: never Cancel-Lock: sha1:v5jqUbqpTHKG4uWppaw/WTrMwWc= "Nikolay Aleksandrovich Pavlov (ZyX)" writes: > In some cases you may use `>(process)` to create > file descriptor that will be used like a named pipe > and may replace real files in some cases (it does > not support seek(), also some processes have a habit > of closing all file descriptors except > stdin/stdout/stderr). But it is launched in subshell > which limits the usefullness further (i.e. > you cannot directly save result in a variable). OK! That doesn't seem like any good samochuvstvie... > Specifically this function does not need >() or any > file at all: > > ... echo -n \$ wget -q $link -O- | grep answer | cut > -d \$ -f2 | cut -d \< -f1 ... But you still need the escaped quotes around "answer" otherwise it won't work due to the HTML data :) Now, it is true you don't *need* files here or in other situations like this. But it is a very good thing to have, to be able to name something something, and then stash the result there for future use. A variable or data structure, in essence. Obviously creating a normal file just to remove it last thing doesn't score you any hacker points... So I think this is a good idea for you to contemplate incorporating in zsh! -- underground experts united .... http://user.it.uu.se/~embe8573 Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic - so far: 25 Blogomatic articles -