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: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Writing freebcp output to a pipe or STDOUT?
  • Date: Tue, 12 Apr 2011 20:00:44 -0400

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.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page