Re: sysfs output without newlines
From: Pete Zaitcev <zaitcev@redhat.com>
Date: 2020-09-01 22:26:19
Also in:
linux-i3c, platform-driver-x86
From: Pete Zaitcev <zaitcev@redhat.com>
Date: 2020-09-01 22:26:19
Also in:
linux-i3c, platform-driver-x86
On Tue, 1 Sep 2020 09:07:42 +0000 David Laight [off-list ref] wrote:
The shell will remove trailing '\n' (but not '\r') from: foo=$(cat bar) So shell scripts are unlikely to be affected.
Surprisingly enough, Python is okay with this:
with open("/proc/sys/net/ipv4/ip_forward",'r') as fp:
print(int(fp.read()))
Nonetheless, I would rather no add those newlines. I saw enough
weird software that is sensitive where it's should not bee.
-- Pete
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel