Results as plain text?


(Rsworden59) #1

Maybe the syntax for this is obvious, but I have not found it. I'm using cypher-shell. Results are presented in ASCII art boxes like this:

+-----------------------------------------+
| movie          | cast          | actors |
+-----------------------------------------+
| "Forrest Gump" | ["Tom Hanks"] | 1      |
| "Cloud Atlas"  | ["Tom Hanks"] | 1      |
+-----------------------------------------+
2 rows

I'm piping the results into a program, so I need to strip off the header/footer, box lines, and whitespace. I'd really like the results to be "bare bones" something like this:

"Forrest Gump","Tom Hanks",1
"Cloud Atlas","Tom Hanks",1

Is there an OUTPUT TEXT option or something to cause cyper to NOT format the output?


(Andrew Bowman) #2

Take a look at the cypher-shell documentation. The --format flag seems like what you're looking for, but note this for the default:

auto displays results in tabular format if you use the shell interactively and with minimal formatting if you use it for scripting.

So auto should work for you if used with scripting, but if you need to force it use 'plain'.


(Rsworden59) #3

Perfect. I was expecting it to be cypher keywords, not a cypher-shell command option.

Thanks!