cypher-shell icon indicating copy to clipboard operation
cypher-shell copied to clipboard

Piping from a file results in empty print lines with auto or plain format

Open john-bodley opened this issue 8 years ago • 2 comments

When piping results for a file, i.e. either via:

> cat /tmp/graph.db.cypher | cypher-shell

or

> cypher-shell < /tmp/graph.db.cypher

cypher-shell (Neo4j v3.2.1) prints an empty line per statement using either the plain or auto formats.

Additionally if using a batch (begin/commit) it may make more sense to only print a summary record after each batch is processed rather than one line per statement especially if there are thousands/millions of statements.

> cypher-shell --version
Cypher-Shell 1.1.1

john-bodley avatar Jun 22 '17 22:06 john-bodley

I encountered the same issue in linux environment. Tried to upgrade to Cypher-Shell 1.1.2 with no luck. Is it fixed in 3.3.0?

joehmchan avatar Nov 02 '17 08:11 joehmchan

I managed to fix the problem by removing BOM characters in the cypher file, which was encoded as UTF-8 with BOM.

joehmchan avatar Nov 03 '17 01:11 joehmchan