<commit_before>#!/bin/bash

# Splice Machine SQL Shell
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

LOG4J_PATH="file:${ROOT_DIR}/lib/info-log4j.properties"
CLASSPATH="${ROOT_DIR}/lib/*"

CYGWIN=`uname -s`
if [[ ${CYGWIN} == CYGWIN* ]]; then
    CLASSPATH=`cygpath --path --windows "${ROOT_DIR}/lib/*"`
    LOG4J_PATH="file:///`cygpath --path --windows ${ROOT_DIR}/lib/info-log4j.properties`"
fi
export CLASSPATH
LOG4J_CONFIG="-Dlog4j.configuration=$LOG4J_PATH"

GEN_SYS_ARGS="-Djava.awt.headless=true ${LOG4J_CONFIG}"

IJ_SYS_ARGS="-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dij.connection.splice=jdbc:splice://localhost:1527/splicedb"

echo "Running Splice Machine SQL shell"
echo "For help: \"splice> help;\""
java ${GEN_SYS_ARGS} ${IJ_SYS_ARGS}  org.apache.derby.tools.ij $*<commit_msg>Added rlwrap capability provided by Gene.<commit_after>#!/bin/bash

# Splice Machine SQL Shell
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

LOG4J_PATH="file:${ROOT_DIR}/lib/info-log4j.properties"
CLASSPATH="${ROOT_DIR}/lib/*"

CYGWIN=`uname -s`
if [[ ${CYGWIN} == CYGWIN* ]]; then
    CLASSPATH=`cygpath --path --windows "${ROOT_DIR}/lib/*"`
    LOG4J_PATH="file:///`cygpath --path --windows ${ROOT_DIR}/lib/info-log4j.properties`"
fi
export CLASSPATH
LOG4J_CONFIG="-Dlog4j.configuration=$LOG4J_PATH"

GEN_SYS_ARGS="-Djava.awt.headless=true ${LOG4J_CONFIG}"

IJ_SYS_ARGS="-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dij.connection.splice=jdbc:splice://localhost:1527/splicedb"

if hash rlwrap 2>/dev/null; then
    echo " ========= rlwrap detected and enabled.  Use up and down arrow keys to scroll through command line history. ======== "
    echo
    RLWRAP=rlwrap
else
    echo " ========= rlwrap not detected.  Consider installing for command line history capabilities. ========= "
    echo
    RLWRAP=
fi

echo "Running Splice Machine SQL shell"
echo "For help: \"splice> help;\""
$RLWRAP java ${GEN_SYS_ARGS} ${IJ_SYS_ARGS}  org.apache.derby.tools.ij $*
{'fraction_non_alphanumeric': 0.18622066899650525, 'fraction_numerical': 0.01347978032950574, 'mean_word_length': 4.964285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7145135', 'n_tokens_mistral': 783, 'n_tokens_neox': 747, 'n_words': 143}