From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17822 invoked by alias); 13 Mar 2015 19:08:38 -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: 20006 Received: (qmail 8088 invoked from network); 13 Mar 2015 19:08:24 -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,T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1426273300; bh=M59fUUAedmORHYvwLU7fhXVYlh3I2PwFHaj+bDEli2Q=; h=From:To:In-Reply-To:References:Subject:Date; b=adfKZdfliTAQRs7es1qdrgzSNIFw9lV6M19NMn3sV2roTUZYID/OtiD41wMQwsmmW 6V/vl82xLc8CeY87m5R2RSk5sN5/xOGuFrU151vwAIX68bEMJYCUekWoDmCqUm3mEC Pk1hK9LZqWqpbFpM10JQ0E9TybxvTjQIhegcXQ7g= From: ZyX To: zzapper , "zsh-users@zsh.org" In-Reply-To: References: <55031519.9020906@mailoo.org> Subject: Re: can I access output of locate? MIME-Version: 1.0 Message-Id: <530591426273299@web30m.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 13 Mar 2015 22:01:39 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r 13.03.2015, 20:19, "zzapper" : > Edelwin Khaelos wrote in news:55031519.9020906 > @mailoo.org: > variables > > # then to answer my own question > a=($(locate my.cnf)) š# the outer () are important Now locate something with a space. This variant works only as long as you are certain you have no characters from IFS in a file name. Thus you should use a=( ${(0)"$(locate -0 my.cnf)"} ). > > echo ${a[1]} > > -- > zzapper > https://twitter.com/dailyzshtip > > --- > This email has been checked for viruses by Avast antivirus software. > http://www.avast.com