From: kalterdev@gmail.com
To: 9fans <9fans@9fans.net>
Subject: [9fans] Re: How do you deal with newlines (line feed, LF, \n) in filenames?
Date: Sat, 10 Aug 2024 17:32:38 -0400 [thread overview]
Message-ID: <17233255580.EbFBd.400013@composer.9fans.topicbox.com> (raw)
In-Reply-To: <17233228160.1d47.67930@composer.9fans.topicbox.com>
[-- Attachment #1: Type: text/plain, Size: 885 bytes --]
Hi sirjofri,
Thank you for your reply. I was referring to having newlines specifically in filenames. Sometimes it's not one's own fault that filenames have them.
I wasn't really speaking about the way to represent a newline in rc, although thanks for details on that problem. My problem is to parse command output that has a newline in a filename.
On my system, find(1) just prints the newline as is. So if the output looks like this:
a
b
It is actually possible that it means one "a\n" file, not file "a" and file "b".
Some commands, including ls(1) from plan9port, support quoting such files. But then the problem is how to parse them.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T11149f1f949593f5-M2e88845b92e7a51dca615ea9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
[-- Attachment #2: Type: text/html, Size: 1592 bytes --]
next prev parent reply other threads:[~2024-08-10 21:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 20:46 [9fans] " kalterdev
2024-08-10 21:05 ` sirjofri
2024-08-10 21:32 ` kalterdev [this message]
2024-08-10 21:48 ` [9fans] " sirjofri
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=17233255580.EbFBd.400013@composer.9fans.topicbox.com \
--to=kalterdev@gmail.com \
--cc=9fans@9fans.net \
/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;
as well as URLs for NNTP newsgroup(s).