0

I am using these functionalities:

Linux>cqlsh
cqlsh>use mydatabase;
cqlsh:mydatabase>source 'myCommands.cqlsh';
...
cqlsh:mydatabase>

Since I am executing a file, I wish to comment some outputs, I would like to find a way to print a sort of echo '' or print "hello"; on the output. Is it possible ?

Alain
  • 1,450
  • 3
  • 20
  • 37
  • @WorkingHard, in MySQL, doing `mysql> select "world" AS Hello;` does the job. I am looking for something similar in cqlsh>. – Alain Dec 19 '14 at 15:17

1 Answers1

1

You could just script this out, piping your split CQL scripts to cqlsh:

#!/bin/sh
echo "SOURCE 'myCommands1.cql'" | cqlsh
echo "hello"
echo "SOURCE 'myCommands2.cql'" | cqlsh
echo "done.."
mshuler
  • 484
  • 3
  • 7
  • Hum... referring to the snippet, the `echo` looked for is within the cqlsh console output. You are suggesting `echo` from a standard *nux shell command which is not what I wish for. – Alain Dec 21 '14 at 21:38