Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for Lover of Structure‭

Type On... Excerpt Status Date
Comment Post #288915 That would already be very much welcomed (but of course the more the better).
(more)
10 months ago
Comment Post #288915 Well, actually, I think we two are on the same page in that we'd be happier if Unix/Linux text files were defined more permissively, but then it's hard (and pointless) to argue with an established POSIX definition. (Also I am trying very strongly to avoid the kind of heated discussion that took place...
(more)
10 months ago
Comment Post #288915 Actually, I don't think the rule is dumb, it's more like that Unix aficionados feel strongly that text files "must" end in newlines. To a layman it's more like, "I heard that you mustn't forget a newline at the end of a text file, because some commands will misprocess data with a missing final newlin...
(more)
10 months ago
Comment Post #288915 Well, some commenters argued that the original short version of my question was unanswerable because you'd have to check every implementation of every Unix/Linux command, because, after all, implementations are free to do whatever they want with malformed input. So I basically added justification for...
(more)
10 months ago
Comment Post #288915 My question is verbose because it was first asked on *Stack Exchange: Unix & Linux*, where it was closed.
(more)
10 months ago
Edit Post #288915 Initial revision 10 months ago
Question What unexpected things can happen if a user runs commands expecting a text file on input lacking a file-final newline?
It is often taught that in Unix/Linux text files should end with newline characters. The reason given (orally) to me by various sources was that "some commands (such as `wc`) assume or require a newline at the end of a text file". (Other commands I am aware of are: `sed`, `read`, `cron`/`crontab`, an...
(more)
10 months ago