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, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31170 invoked from network); 16 Jun 2022 16:30:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Jun 2022 16:30:18 -0000 ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1655397018; b=qoWIChxANOdx/J60vYu99fDlrhO+GJD6CcvjdbQpiepSOL+jRwT6pnYK3xjoPcWPugHx85OpOg JGGP7qtZquKmQeWf0AkM9STOxI6++A4PJ3jriHFmrpGzv4WskxvbbV46dVVnqJlBdHZP1Bkt1O I5ZKJALTaOIfNmek2TDD3I2sdhiMZnJ6xARfobyGqPbG6+aokCErFz5fVg2xS1tOLTpb934Vyr uPRb84eZ6o4oz/0d12x41B4oodHK2iBN4iUEbeE/DxKsLDP2maSeuGQKbE/DUu/SqX6SYAsacm yc/KuPzbkIWOSi0xH05Dh44YSwR9hJEH+PLx2Ww2hKP+Hw==; ARC-Authentication-Results: i=2; zsh.org; iprev=pass (olivedrab.birch.relay.mailchannels.net) smtp.remote-ip=23.83.209.135; dkim=pass header.d=easesoftware.com header.s=default header.a=rsa-sha256; dmarc=none header.from=easesoftware.com; arc=pass (i=1) header.s=arc-2022 arc.oldest-pass=1 smtp.remote-ip=23.83.209.135 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1655397018; bh=VEMAQ8cK3OR9cVxGwcHj+TzZCdHL1UT2OAT9BBsvBFo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:Date:Message-ID:Subject:MIME-Version:Content-Type:From: DKIM-Signature:DKIM-Signature; b=kRzAxMwvY45j3dPAxKy8bC0GmtWjcNk47DRtvMPIwcf/ymVuCNQL/haaDIQBdRJsFOu5qmv/9X Pe88QdjU+THdAHxCflhfBS8b+RAapfzdD5wehQHw0Xox+EP0AXYYUawKn87TWOvJIKOicRpTNh dFmTIiEUEWOXzvn4T8Ydj9TDTzXQfCbzbGaHBRFxnY6bgz80G8v49eDoc0jfZ/8p2a+ayCsIWI W+myllxfn9shtKSmTBKPkfMOHsILmY7XG+qJ7LTknDzETnp7IBd4ykijC/mnPxUKqhvcTfoEpk +bN9nWgiPlnYyAsrh5jIak6X4CttW+L6wluPBpRL+AwLOA==; 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:To:Date:Message-Id:Subject: Mime-Version:Content-Type:From:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=YOzxceBiP9DflLlycBJZSVlI57sATD9kCVC2iuTkdUg=; b=OsDdgMcwgaWtrYi0aXbOE0B5w9 x5oP3jPXXiTnRSAvk+wYiC093njcH9ee18reBfeoNW+Oae+qSAcbZYDj5CuBpvobeN5JeWYP769Pn 7VULbFIwWPW04ZZlaJP1s6sVeUl4H6jgW754MhSwzjqFPVYGALeVwPPrrIwDH7ZYJd6SDBRTsMcuh jeFbuqHR3xAimLc7OTpK36AYqrjhqnkT0mkTnzs2VJufT63r9HMRW6ZxTg8mmt9vJhQVXMI+QUtme zAqKjXtFtbDxmdoP3kR5vOedkAy8tfq2xRUsHK1AleV0oGFdqpwOrwx6yTF1rcmzvtc4FLmViw526 ft5C2Nmw==; Received: from authenticated user by zero.zsh.org with local id 1o1sNt-0004JM-7q; Thu, 16 Jun 2022 16:30:17 +0000 Authentication-Results: zsh.org; iprev=pass (olivedrab.birch.relay.mailchannels.net) smtp.remote-ip=23.83.209.135; dkim=pass header.d=easesoftware.com header.s=default header.a=rsa-sha256; dmarc=none header.from=easesoftware.com; arc=pass (i=1) header.s=arc-2022 arc.oldest-pass=1 smtp.remote-ip=23.83.209.135 Received: from olivedrab.birch.relay.mailchannels.net ([23.83.209.135]:52004) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1o1sN8-0003bF-Vu; Thu, 16 Jun 2022 16:29:32 +0000 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 21F9B80EC3 for ; Thu, 16 Jun 2022 16:29:28 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 82614812E5 for ; Thu, 16 Jun 2022 16:29:19 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1655396959; a=rsa-sha256; cv=none; b=i1iu05v6rCthldryQ9BHReujMDL/kr+QPRYudSKIY+l0WAKYjQWnXOvqEElCHECYJGFKnk XYv+pjaXTB8lFtTz1MHjfoWBgdorRaS9T9eNGOgLzXfYQvUirUHBJg1LqP5dzR8B9BttJE koxOTEQPbFiMYXkH/6fMxCiWG/B9XKiw+fJbPSlmO1CNWziGlKdg0Qyj4ffVa79gkg0B54 FA56KWctpuzpti6AiqyrZWVISY5+yHOZRz9euYIR+uYDK+B3mTRAqa2V0LaKSlJ0E/IUim HSsv5ALnFj+I+8KiVBQwxWM/mJJBj5tbA6c3y2dkpCZLul7unrDbCTt2lw1qhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1655396959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=YOzxceBiP9DflLlycBJZSVlI57sATD9kCVC2iuTkdUg=; b=MOt/zYVuJN0oasmW2E4lvPHZawuFv/rZECqCiK7Mf0Xwfq9J7+h3hmnYrs6RyIfYsnUpI2 6hxy8W/+mN2dI2O0A33TPvVcRLl1AELtoQKc8DbCSMEHGcce4fFOgIottg5PXlHmd1x0h7 3nRNsCg71E5nDL2aRmAy0vEo2ya+Ur3P6NOSax7P8u41kIDXqbYFnSRlXpgILFu9Duq6Hc NHPRIg0fIMdrj7i2fACrXjjVI6E1NbyL8hosCNmS0gjbjDZgFI8lUHTowAQA0r3fTmuWtJ Z0k0oLhdwF02lgi1Ff/5c+/2Tf5bdXXYlbbnkyFG3q0sTJcX+qtFobkPwJSAdQ== ARC-Authentication-Results: i=1; rspamd-848669fb87-k2xd5; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Average-Spot: 261cbdcb2f0d4a3e_1655396967695_1799669586 X-MC-Loop-Signature: 1655396967695:3552590029 X-MC-Ingress-Time: 1655396967695 Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.255.191 (trex/6.7.1); Thu, 16 Jun 2022 16:29:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Type:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YOzxceBiP9DflLlycBJZSVlI57sATD9kCVC2iuTkdUg=; b=EOqbCUbVmteVXLqkbeJup4BwOd 7dKy+GskG36xwzklYwz3AuAG3zx8QsMR2+bV0cndE0tZW/3yDH265aBHZMbNCrFkhs7s4X0fJygzx Aj2FMgOXC//IuZr56QOgkzwb/Z2VP4PiOjsAY92ibNmPIQeVuOEWd1IKtZvRePfaypa4YVDXzG0h8 CIylT5ZDyoE6JPGx6iF/Yut9pO3hR/GgNI9E/ZyWGbzDMJBhnyj5iTFzR8MuSww9eJqD7ogd+xgFv sz89ZdE71w98Uw9pqyyKWT5wPrrgWJoXeMBhEWnoNY6a6+vffWJMcSLSRjIsLarsCpuh2OQGFUkEf qaQci4Uw==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:50870 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1sMv-0001O8-Va for zsh-users@zsh.org; Thu, 16 Jun 2022 12:29:18 -0400 From: Perry Smith Content-Type: multipart/signed; boundary="Apple-Mail=_86A513BB-1275-45D4-846E-15E6CA9B6E65"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Naive read mistake Message-Id: <8D7372B3-C4F1-4ED4-81D6-C11C3B7D385A@easesoftware.com> Date: Thu, 16 Jun 2022 11:29:17 -0500 To: Zsh-Users List X-Mailer: Apple Mail (2.3696.100.31) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com X-Seq: 27848 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: --Apple-Mail=_86A513BB-1275-45D4-846E-15E6CA9B6E65 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99ve been seriously confused with a simple function that is = reading the output from a curl https command. I finally figured out the = issue and everything is working as documented but thought I would tell = of my saga. =46rom the documentation for =E2=80=9Cread=E2=80=9D: > The value (exit status) of read is 1 when an end-of-file = is > encountered, or when -c or -l is present and the command = is not > called from a compctl function, or as described for -q. = Otherwise > the value is 0. I had the common loop: while read line ; do =E2=80=A6 done For me in this instance, the loop is not executed on the last line = because it is not terminated with a newline. line is set but the read = returns 1 since it hit EOF. All this is correct as far as I can tell = but I just wasn=E2=80=99t expecting it. I=E2=80=99m using curl with =E2=80=9C-i=E2=80=9D to an HTTPS API = returning headers and JSON. The function I was having problems with was = to separate the headers from the JSON output. So this issue might come = up for others. Thank you for your time, Perry --Apple-Mail=_86A513BB-1275-45D4-846E-15E6CA9B6E65 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmKrWl0ACgkQjxzk9yzE +MCFTQ//VZJgYQuCluVBSGpDdcvsahoCqBxfLEp/ruQCZTZAR/tpIsawzX2UbleN ixO3wOPIwhLvWgJWXTAQs4J7gKrpOlAz6K+WLv0sCEhrJfI4ChtGYP/WEYg2AZ/u gbdCNNhTqCnnE6Jg+472B7+bwOv7urdAF7gnaV1XafYbDLT+40NVn6/fItxVkCKN eMt1E1CLlxFDu/MMXd1+Xkwbazzr9tiz3aU/fE9QJtJy4JT10KtEHgOihwvHA1yC yJTNVhmj1KA9Vmd1Dv/Eon3lORdMI2DPu5HQ/RlcU0K00iDrSu3r+VTMge5Sw1fB +sjtRL5glFs2jqWHPnkZDwY7W+fp2KKeg60+q18gunCXvb+KM+S4/wSJMXVuXjEB m5uZ3CRN3kOMpqFtYTllA4qimWY382jaGtA5+XL8NgzYbSIdSPC6R4NvgA7bB3mF BbM7jbUwac8aJNd77ZFh7CRt65JeH2SlbcMOSI2uaYXUvY6jLHEVtZFLpfz07S5C /A9cO7Jw1bMi9aCgV+7od7QxZDbKSdSzmhUeKe+aBzgGFkd1D8KYCH/9cqkXGnWD 4w4Uu+cy8hJxqWczVRZXyVG+us+hwRn/nUCvK5Ag34uf339a51KcAv3uHihNLGoP SUDFTNa0hjTZq7LNvUFiClwHzNVeN8ShL/7QqgrKjOQkgK/5DGE= =H8UM -----END PGP SIGNATURE----- --Apple-Mail=_86A513BB-1275-45D4-846E-15E6CA9B6E65--