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:29:30 EDT (-0400)
  Re: how to scheme a cat up?  
From: Daniel Bastos
Date: 19 Aug 2009 11:07:16
Message: <4a8c1524$1@news.povray.org>
In article <4a8bba80$1@news.povray.org>,
Invisible wrote:

> Warp wrote:
>
>>   'cat' is a program for concatenating files. It's used like:
>> 
>> cat file1 file2 file3 > concatenated_files
>> 
>>   Your program does not fulfill this role.
>> 
>>   (Some people abuse 'cat' to concatenate one single file with nothing,
>> but that doesn't mean that the role of 'cat' is anything else than
>> concatenating files.)
>
> Interesting. I thought it was for concatenating a file to stdout...

It is. :-) In the same order in which they are read.

> Alrighty then:
>
>    import System.Environment
>
>    main = do
>      args <- getArgs
>      mapM_ (\arg -> readFile arg >>= putStr) args
>
> That seems to work.
>
> I'm guessing the real cat program also has assorted command-line 
> switches as well though?

Your cat has a disease, common in recently seen cats, the makes it
ignore the stdin.


Post a reply to this message

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