Skip to Content.
Sympa Menu

freetds - Re: [freetds] Writing freebcp output to a pipe or STDOUT?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Igor Korot <ikorot01 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Writing freebcp output to a pipe or STDOUT?
  • Date: Tue, 12 Apr 2011 17:47:09 -0700

Hi,

On Tue, Apr 12, 2011 at 5:00 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> On Sun, 10 Apr 2011 01:31:20 -0400
> <Jerry.Crocker AT emc.com> wrote:
>
>> Is it possible to direct the output of freebcp to a names pipe or to
>> STDOUT? ... or does it always have to write to a disk file?
>
> Most systems nowadays support /dev/stdout:
>
> $ freebcp systypes out /dev/stdout -c -t'|' ... | head -3
> bigint|127|0|127|8|19|0|0|0|1|0||0|0|1|63||19|0|
> binary|173|2|173|8000|0|0|0|0|1|0||3|0|1|45||8000||
> bit|104|0|104|1|1|0|0|0|1|0||16|0|1|50||1|0|
>
> To a named pipe works, too, of course.
>
> >From a named pipe does not, unfortunately, because freebcp seeks over
> the file while parsing it.

However, you can probably write a small Perl script to achieve this. ;-)

Thank you.

>
> HTH.
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page