From: Pete Zaitcev <zaitcev@redhat.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"Kai Mäkisara" <Kai.Makisara@kolumbus.fi>,
"Gustavo A . R . Silva" <gustavoars@kernel.org>,
"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Madalin Bucur" <madalin.bucur@nxp.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Alex Dewar" <alex.dewar90@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Tomas Winkler" <tomas.winkler@intel.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
Subject: Re: sysfs output without newlines
Date: Tue, 1 Sep 2020 17:22:30 -0500 [thread overview]
Message-ID: <20200901172230.531decf6@suzdal.zaitcev.lan> (raw)
In-Reply-To: <5f0b48e0291b4b54bc1caeb8b5715c65@AcuMS.aculab.com>
On Tue, 1 Sep 2020 09:07:42 +0000
David Laight <David.Laight@ACULAB.COM> 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
next prev parent reply other threads:[~2020-09-01 22:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 18:23 sysfs output without newlines Joe Perches
[not found] ` <0f837bfb394ac632241eaac3e349b2ba806bce09.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2020-08-29 20:23 ` Denis Efremov
2020-08-29 20:33 ` Joe Perches
[not found] ` <b64a4cb0ee68fee01973616e5ef0f299ac191f6d.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2020-09-01 9:07 ` David Laight
2020-09-01 22:22 ` Pete Zaitcev [this message]
2020-09-02 7:57 ` Andy Shevchenko
2020-08-30 9:11 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200901172230.531decf6@suzdal.zaitcev.lan \
--to=zaitcev@redhat.com \
--cc=David.Laight@ACULAB.COM \
--cc=Kai.Makisara@kolumbus.fi \
--cc=alex.dewar90@gmail.com \
--cc=arnd@arndb.de \
--cc=gustavoars@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=michal.simek@xilinx.com \
--cc=rafael@kernel.org \
--cc=tomas.winkler@intel.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox