Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11722
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | ziyunfei <446240525@qq.com> |
| Newsgroups | gnu.bash.bug |
| Subject | The <newline> character can also be an "IFS whitespace character" |
| Date | Tue, 20 Oct 2015 22:21:19 +0800 |
| Lines | 22 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.686.1445350913.7904.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 (Mac OS X Mail 8.2 \(2102\)) |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1445350913 30787 208.118.235.17 (20 Oct 2015 14:21:53 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201307; t=1445350881; bh=78gIjURA7CnWOqZadSsEcr8256f8P8IFaG0feB8rLPA=; h=From:Content-Type:Content-Transfer-Encoding:Subject:Message-Id:Date:To:Mime-Version; b=Vn/HRgwumPPFjEBMU3fJEXhyJFkdfDtWSaMGpjD17uQAZnRAZxzzG+Kg5fj+rjdHo GDArabmii0friI6Yu/iaIyDKgBsnxPbcsekxPIAQ48GtT0QiOhtCyCcCPk2ZgxATKT VslZlJK98M7G7nfqw8SUOlWo8/u1Ycqzqc3OKaq4= |
| X-QQ-mid | esmtp31t1445350880t829t14528 |
| X-QQ-SSF | 0100000000000010F0K01F00000000G |
| X-QQ-FEAT | 7jaP4Z0I0NWkJc0k9vmzS2m0gfy3J9hHNb2P67qfah3wJ/hkJzSTLUmqatGkZ IyQEL1ogGZDiSELdPBInOBNfKwRdp2lApOs4FqJiDeoYweybG1R43q/E2NYND2i0S71Bul5 pcyCRCFJbmrfXe35YLA0Nh60/dpjbAUW/d8Yl+fdR30MQVCsYhuGFIfib7nIcjCfNL9rfdX s6YeBh0HqF3IEVjSWXfZSG4uq424uNxU= |
| X-QQ-GoodBg | 0 |
| X-Mailer | Apple Mail (2.2102) |
| X-QQ-SENDSIZE | 520 |
| X-QQ-Bgrelay | 1 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x |
| X-Received-From | 54.204.34.130 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11722 |
Show key headers only | View raw
Quoting from the bash manual: "If IFS has a value other than the default, then sequences of the whitespace characters *space and tab* are ignored at the beginning and end of the word, as long as the whitespace character is in the value of IFS (an IFS whitespace character)." If this is true, then the following script $ IFS=$'\n' $ a=$'\n1\n2\n' $ printf "%s\n" $a 1 2 should print <> <1> <2> 3 fields, but it doesn't. So I guess *space and tab* should be replace by *space, tab and newline* in that section.
Back to gnu.bash.bug | Previous | Next | Find similar
The <newline> character can also be an "IFS whitespace character" ziyunfei <446240525@qq.com> - 2015-10-20 22:21 +0800
csiph-web