How can I change where unix pipe sends its results for the split command?

Basically I'm doing this:

export_something | split -b 1000

which splits the results of the export into files names xaa, xab, xac all 1000 bytes each

but I want my output from split to go into files with a specific-prefix. Ordinarily I'd just do this:

split -b <file> <prefix>

but there's no flag for prefix when you're piping to it. What I'm looking for is a way to do this:

export_something | split -b 1000 <output-from-pipe> <prefix>

Is that possible?


Yes, - is commonly used to denote stdin or stdout, whichever makes more sense. In your example

export_something | split -b 1000 - <prefix>

Need Your Help

Apache and NodeJS on the same server. Can they talk to each other?

php node.js apache

I've got Apache (running PHP and serving static content) and NodeJS (for websockets) running on the same server under the same domain (different ports). I'm not using nginx. I've already got the