From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 2 Jan 2016 05:12:14 +0000 From: "Brian L. Stuart" To: , <9fans@9fans.net>, erik quanstrom Message-ID: <594280736.4698467.1451711534944.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <594280736.4698467.1451711534944.JavaMail.yahoo.ref@mail.yahoo.com> Subject: Re: [9fans] Pi updates Topicbox-Message-UUID: 7cf9a610-ead9-11e9-9d60-3106f5b1d025 On Fri, 1/1/16, erik quanstrom wrote: > i'm looking @ the gpio interface, and i wonder what the recommended > technique for sampling a pin might be from a shell script? I haven't really used it in shell scripts, but if I were going to do so, I'd probably write up a little utility to take a hex string and a bit number and do the 'and' on it. Then feed that with the result of dd to get exactly one sample from devgpio. On the other hand, if one of the usual suspects (e.g. hoc, bc, dc, awk) have some bit-wise operators I'm forgetting, use that. BLS