Re: How to read data from stdin?

On Tue, Jun 3, 2008 at 9:29 PM, Davies Liu <davies.liu> wrote:> On Wed, Jun 4, 2008 at 8:19 AM, Aaron Davies <aaron.davies> wrote:>>>> On Tue, Jun 3, 2008 at 2:42 AM, Davies <davies.liu> wrote:>>>> > how to read data from stdin in q scripts ?>>>> what a coincidence, i just found out about this last week :)>>>> do a text read from fd 0>>>> #!/usr/bin/env q>> data:read0 0>> Then what about stdout and stderr? I had tried but failed.>> 1 0: data / failed> 2 0: data / failed> string data / success, how to format ?however you like. e.g., ","0:table creates a csv; send it to 1 toprint on stdout. if you want something more complicated, write afunction to render the table.-- Aaron Daviesaaron.davies@gmail.com</davies.liu></aaron.davies></davies.liu>