On  8 Jan, Rod Butcher wrote:
>  Is there a standard for what comes after the last record in a file, on 
>  Linux/Unix ? 

The definition of a line of text in traditional Unix has always been,
AFAIK, a sequence of characters up to a LF character.  A text file is
just a sequence of lines.  Ergo, the last character must end with a LF
if it is to be handled correctly by all Unix text processing utilities.

Older (especially, non-GNU) utilities also had line length limits built
in (e.g. shells still do, AFAIK).

I'd say the KDE utility is doing the wrong thing, strictly speaking.

There's probably a POSIX standard defining this stuff, but that doesn't
say much if you're interested in portability with older systems.  The
closest you'd probably come (trying to think of a reference to back up
my claims), would be a reference by Kernighan or Ritchie.  (Maybe the C
ref manual, or some of the older man pages for sed or sort.)

The best hint I can find is a reference on p17 of the original C prog
language i the context of a tutorial program: "Input lines are assumed
to be terminated by the newline character \n which has been religiously
appended to every line written out."  But that's only a hint.

luke

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to