You can get the predictions, probabilities, etc. in the command line by using the following options available in every classifier:
-classifications "weka.classifiers.evaluation.output.prediction.AbstractOutput + options"
Uses the specified class for generating the classification output.
E.g.: weka.classifiers.evaluation.output.prediction.PlainText
-p range
Outputs predictions for test instances (or the train instances if
no test instances provided and -no-cv is used), along with the
attributes in the specified range (and nothing else).
Use '-p 0' if no attributes are desired.
Deprecated: use "-classifications ..." instead.
-distribution
Outputs the distribution instead of only the prediction
in conjunction with the '-p' option (only nominal classes).
Deprecated: use "-classifications ..." instead.
For instance, using NaiveBayes over the weather dataset:
$ java weka.classifiers.bayes.NaiveBayes -t weather.nominal.arff -classifications weka.classifiers.evaluation.output.prediction.PlainText
=== Predictions under cross-validation ===
inst# actual predicted error prediction
1 2:no 1:yes + 0.926
2 1:yes 1:yes 0.825
1 2:no 1:yes + 0.636
2 1:yes 1:yes 0.808
1 2:no 2:no 0.718
2 1:yes 2:no + 0.656
1 2:no 1:yes + 0.579
2 1:yes 1:yes 0.541
1 2:no 1:yes + 0.515
1 1:yes 2:no + 0.632
1 1:yes 1:yes 0.84
1 1:yes 1:yes 0.554
1 1:yes 1:yes 0.757
1 1:yes 1:yes 0.778
The output is tab-separated.