Thread

  1. Help: How to store query output in a file !!!

    NEERAJ BANSAL <nbansal1@email.mot.com> — 2000-06-13T14:37:16Z

    Does anyone knows how do you send query output to a file???
    I tried following but it does not work:
    select * from <table name> \o <file name> ;
    
    Please let me know if anyone knows!! Thanks in advance
    
    Neeraj
    neeraj_b@hotmail.com
    
    
    
  2. Re: Help: How to store query output in a file !!!

    selkovjr@mcs.anl.gov — 2000-06-14T07:08:17Z

    > 
    > Does anyone knows how do you send query output to a file???
    
    Welcome to Unix(TM):
    
    psql <database> -c "select * from <table name>, etc." > <file name>
    
    See also:
    
    http://www.isu.edu/departments/comcom/unix/workshop/io.html
    
    or, type "unix tutorial" in any web search engine.
    
    --Gene
    
    > I tried following but it does not work:
    > select * from <table name> \o <file name> ;
    > 
    > Please let me know if anyone knows!! Thanks in advance
    > 
    > Neeraj
    > neeraj_b@hotmail.com