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>