help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help fixing NativeMessaging host: read 32-bit message length in nati


From: guest271314
Subject: Re: Help fixing NativeMessaging host: read 32-bit message length in native byte order
Date: Sat, 24 Jun 2023 22:14:59 -0700

Is this considered portable?

  length=$(busybox dd iflag=fullblock bs=4 count=1 | busybox od -An -td4)
  message=$(busybox dd iflag=fullblock bs=$((length)) count=1)

On Sat, Jun 24, 2023 at 9:12 PM Lawrence Velázquez <vq@larryv.me> wrote:

> On Sat, Jun 24, 2023, at 11:36 PM, guest271314 wrote:
> > Are you suggesting I substitute "shell" for "bash"?
>
> This would not really be accurate, as your code uses nonportable
> extensions like read -N.  There is nothing wrong with that, as long
> as the requirements are clear.
>
> --
> vq
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]