POV-Ray : Newsgroups : povray.off-topic : how to scheme a cat up? : Re: how to scheme a cat up? Server Time
5 Sep 2024 15:27:19 EDT (-0400)
  Re: how to scheme a cat up?  
From: Invisible
Date: 19 Aug 2009 08:52:55
Message: <4a8bf5a7$1@news.povray.org>
>> I'm guessing the real cat program also has assorted command-line 
>> switches as well though?
> 
> OK, so let's ask the manpage:
> 
> http://unixhelp.ed.ac.uk/CGI/man-cgi?cat

Apparently POSIX only specifies the -u option; the rest is extensions. 
(Common ones though, apparently.) This is apparantly typical for all 
widely-known Unix commands. I guess we can thank 40,000,000 years of 
backwards compatibility for that.

> I'll see if I can't produce a full implementation...

The attached program appears to do the job. There are probably still 
some bugs in it though.

[I definitely can't guarantee it works the same as GNU cat, because I 
don't have anything to test against. It's probably broken in it's 
handling of "\n" and/or "\r", the line numbering, the text/binary 
distinction, and a few other things.]


Post a reply to this message


Attachments:
Download 'us-ascii' (5 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.