[
https://issues.apache.org/jira/browse/CASSANDRA-7172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990681#comment-13990681
]
Brandon Williams commented on CASSANDRA-7172:
---------------------------------------------
For now, you could workaround this with something like "echo 'SELECT * from
myks.mycf;' | bin/cqlsh > outputfile"
> cqlsh: Accept and execute CQL statement(s) from command-line parameter
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-7172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7172
> Project: Cassandra
> Issue Type: New Feature
> Components: Tools
> Reporter: PJ
> Priority: Trivial
> Labels: cqlsh
>
> I don't know if there is a workaround for this, but currently, if I want to
> dump the output of a statement into a file, I need to save the statements
> into another file and pass it as input to cqlsh. Something like:
> $ cqlsh -f [statement_file] > [output_file]
> I am aware of the existence of the cqlsh CAPTURE command but it doesn't work
> for everything (particularly, for cqlsh-only commands like DESCRIBE)
> To solve this, I propose that you add an "-e" parameter to cqlsh that accepts
> a valid CQL statement to execute. This is exactly the same as MySQL CLI's
> "-e" parameter:
> http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html#option_mysql_execute
--
This message was sent by Atlassian JIRA
(v6.2#6252)