From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9614 invoked from network); 13 Jan 2024 02:20:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Jan 2024 02:20:39 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1705112439; b=BsGWUgYdJrxUXsPiEZRgHQ1IJ1bHK1DOJnLKd2fPwjyvtqaCm6UBNflpyj3S/09IXShFBqO/N2 QhWgkhb5M1ReW8q37ZLUxWPElTJzgBW0rY4zNSmOgzHL9zpLqYvHvzQ4dXVSwMYDhHwxp3FWWR XN6DBho39sLi2YXQwHG7W3XukwN3vL89DCHTJyeMU3qtOj7yKl9o0gOCIt6ZZVMYo8xsWyWYfP 3rvvhLfK1xh1UwshwDOxhjD3VgXMi6MlDjuADLxmmlfyaC9BTMwFHiGw0d1kiRH4+zj21TJjKh ar6OH7Z9IZrDb2CojYEOVS7QoSVvOE5xjtOMJW6S5nYzXQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1705112439; bh=sV+0Ec0cGBs/3XwEszN/h+dnbNs/yV+p5kA6YfnUNzM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=THm0jNiFswRyFWlKmnP9McAWRDwpFlPv0Xdqr8cwvq5LtBEfEHuhjYdLj3eoRLcbPr99Xb1XCM UTSMz1tG73rY/PK3vD/XOC6mnjd/4VCVbgqdLS5DgG/L8XjcW/ZmNN0vAK41/OrLpnPIAuUF5r 2zexhkg6nHcfRt3MzVjk35du5WChvFs7Csv8HhgovutBNyjH+t6Z1HsjHKKMOxerIKHau8jhh8 rjt4RcT5y6NdktsnRPFy4uchb9r335YDW11Gi18h2uMAdfbi+PvnPSgDv0UWbkCoqQHDk7E9ei m0hS5FcXfLcnx/4U2+Xi0MtfLC7ZyKlcAgluC9os32LfGg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=M6+7dRqC8GEZt5LgoaTDVhYDNbokSxk0BMJ9dTyt7Rg=; b=Xy9Z8uCB28aR5U556dkc/71E+I zbwAbnkpQF+NrNSDrEUqg2xvEJar15lzTM/MYtD1g2fYdjeJ4xRlOTuHatjEV8eRgRqKy70IEeClo IuCB6clM1EDOZkvthAEOfztk1n8GoHzWOFL511hfD9X1yMDMmjljaXaHaCW/7/TECbzw9dCwXpvny DiIf9tXkDstn0KD1DoE7V0sd+hmje5JRKKmPj7R1JIt/uf4b0QvjgE9407NG83VM1dfdyAGvrOKB8 bXgN8bptk7NBVzM1WIe0FcR+cq7a2zFGmv/fMQlW8NZIzfA0yME1dWYZg2fCBEWb1boDoi0H0UzeN sUDoZpHg==; Received: by zero.zsh.org with local id 1rOTdX-0005se-7k; Sat, 13 Jan 2024 02:20:39 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:36611) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rOTcm-0005AC-Sv; Sat, 13 Jan 2024 02:19:53 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S762HVP6H53DA30@mta02.eastlink.ca> for zsh-users@zsh.org; Fri, 12 Jan 2024 22:19:51 -0400 (AST) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id OTckrZRv2tqGEOTclrEuYI (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 12 Jan 2024 22:19:51 -0400 X-Authority-Analysis: v=2.4 cv=Zvoraf3G c=1 sm=1 tr=0 ts=65a1f347 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=RUMlV9hlH7BhApURaW4A:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeiiedggeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepteffhffgvdeffeelveelhfegudevkeduhfehheevhfekhfevieehjeejheefvefgnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddruddungdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Fri, 12 Jan 2024 18:19:50 -0800 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fwd: more splitting travails Content-language: en-US To: zsh-users@zsh.org References: <205735b2-11e1-4b5e-baa2-7418753f591f@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29457 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 2024-01-12 12:51, Bart Schaefer wrote: > On Fri, Jan 12, 2024 at 12:32 PM Ray Andrews wrote: >> % vvar=("${(@f)"$(> >> ... and that's not as Byzantine as it looks: " (@f) : read: "include blank lines, and split on newlines (including empty lines) " ... Yes? > Close. It's the inner double quotes around $(<...) that preserve the > exact contents of the file.** Yes > (f) means split on newlines Yup > and (@) > means "this is an array, don't join it into a string". There's a mistake: I thought the @ was what meant 'all lines'. > Then the > outermost set of double quotes means "include empty array elements" > (which, because of (f), is empty lines in this case). Nuts, if the innermost quotes say 'exact contents' then that seems redundant. And I thought the outermost parenthesis said 'this is an array', not the '@' > ** Except that $(...) trims off TRAILING newlines, so if the last > line(s) of the file are blank they'll vanish. Easy when you know how.