Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: bash sockets: printf \x0a does TCP fragmentation Date: Sun, 23 Sep 2018 14:26:32 -0400 Organization: ITS, Case Western Reserve University Lines: 27 Approved: bug-bash@gnu.org Message-ID: References: <20180921231101307758654@bob.proulx.com> <714e1ba0-0052-2f2b-676d-778f2b7129c1@testssl.sh> <20180922111950901701520@bob.proulx.com> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1537727202 19474 208.118.235.17 (23 Sep 2018 18:26:42 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:cc:subject:to:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ni9gnyCAXa2KY+CFefrHuSMwGt8XoGTJRcM3XoDmddw=; b=CfUKaPWHNIvSMaPSE0XQNRGcrHirHfyAYiilyRRVfnuZoXagq7D4hOX/Jt5vQydoni x0zLPausaRq702HTyzWjyxkBZiV85g6kLgipgfJrXixQ+NvDnCbEcmyqXYumPI3QUg0n c+tUq/RKbO6hodHe+BzkOA5Z1F1i9HgAQNjlYgVTWxi/v0gvzzKfIuFRtIFtne1bDRjf hx2KoTk+O4fc7HiACzzTILgAQw3oKCy7aR6EUdhkv/gRoN7qWP/1wUYvpN/fFpfNoN3S +I7or9eejC1lVutrEd5BWDoMRXYTCnzS66V75qvIrrZaFAm1ivWovp5a0r+8QhpZ74h2 ocIw== X-Gm-Message-State: APzg51Bkevr3FZDVlYjnpYDu9qwkiPfTTdOuvZcNMU2mnlJ94L9CzyZt xBzkjp9iJS22JYMhMIhbRW8fLl1GoUuTSUwtbnlCPTsRsvXxr8jFMz0UX+NFs/yl/GJq9Agio3M POX/JTaT3UYo= X-Received: by 2002:a6b:b20b:: with SMTP id b11-v6mr5483054iof.172.1537727194977; Sun, 23 Sep 2018 11:26:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV600EF7v3YwwPHVD9TmJU5qG0/3MToNpuCsltK8Fs+x8U6Qf9yWxFafTDJ7zwD9OZzTQn3SKxg== X-Received: by 2002:a6b:b20b:: with SMTP id b11-v6mr5483046iof.172.1537727194754; Sun, 23 Sep 2018 11:26:34 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 In-Reply-To: <20180922111950901701520@bob.proulx.com> Content-Language: en-US X-Junkmail-Status: score=7/90, host=mpv3-2015.case.edu X-Junkmail-PrAS-Raw: score=7/90, refid=2.7.2:2018.9.23.174516:17:7.944, ip=, rules=__YOUTUBE_RCVD, __X_GOOGLE_DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NO_NAME, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __ANY_URI, __URI_WITH_PATH, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __FORWARDED_MSG, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1000_1099, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, IN_REP_TO, MSG_THREAD, __FROM_DOMAIN_IN_RCPT, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 129.22.103.194 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14645 On 9/22/18 4:22 PM, Bob Proulx wrote: > Note that I *did* provide you with a way to do what you wanted to do. :-) > > It was also noted in another message that the external standalone > printf command line utility did buffer as you desired. That seems > another very good solution too. Simply use "command printf ..." to > force using the external version. This won't work the way you want. The `command' builtin only inhibits execution of shell functions. It still executes builtins. You want to either get the full pathname of a printf utility using `type -ap printf' and use that, or use the env or exec variants I recommended in my last message. > > Anyway... Since printf is a text oriented utility it makes sense to > me that I would operate in line buffered output mode. It's that bash sets stdout and stderr to be line-buffered, not anything printf-specific. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/