Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14659 > unrolled thread

Re: bash sockets: printf \x0a does TCP fragmentation

Started bydirk+bash@testssl.sh
First post2018-09-25 15:04 +0200
Last post2018-09-25 15:04 +0200
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bash sockets: printf \x0a does TCP fragmentation dirk+bash@testssl.sh - 2018-09-25 15:04 +0200

#14659 — Re: bash sockets: printf \x0a does TCP fragmentation

Fromdirk+bash@testssl.sh
Date2018-09-25 15:04 +0200
SubjectRe: bash sockets: printf \x0a does TCP fragmentation
Message-ID<mailman.1295.1537880694.1284.bug-bash@gnu.org>
On 9/23/18 8:26 PM, Chet Ramey wrote:
> 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.

FYI: I ended up checking with type before whether an external printf
exists and set a variable for this and then just call this variable.

env or exec: never thought about it (thanks!) but as both are external
commands, that would mean upon every call one additional external program.
(yes, I know that there is such thing as a fs buffer). Subshells also costs
resources. As this is a core function I am happy for every homeopathic dose
of time I safe here :-)

Cheers, Dirk

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web