\ssp

\section*{PKID Call BASH Script}

\dbsp

Usage: pkid \textit{datafile}

\lstset{language=bash}
\lstset{backgroundcolor=\color{listinggray}}
\lstset{frameround=tttt}
\lstset{basicstyle=\tiny}
\lstset{showstringspaces=false, showspaces=false, showtabs=false}
\begin{center}
\begin{lstlisting}[frame=trBL]{}
#!/bin/bash
myJava=${myJava="java -Xmx1024M -cp /home/donaldb/bin/weka.jar "}
myFilter=${myFilter="weka.filters.unsupervised.attribute.PKIDiscretize "}
inFile=${inFile="-i" $1}
myOpts=${myOpts="-R first-last -c last"}

command=${command= $myJava $myFilter $inFile}
$command > out.data

prunejava out.data > out2.data
cat out2.data
rm out.data
rm out2.data
\end{lstlisting}
\end{center}

\ssp

\section*{Prunejava GAWK Script}

\dbsp

\lstset{language=awk}
\lstset{backgroundcolor=\color{listinggray}}
\lstset{frameround=tttt}
\lstset{basicstyle=\tiny}
\lstset{showstringspaces=false, showspaces=false, showtabs=false}
\begin{center}
\ssp
\begin{lstlisting}[frame=trBL]{}
#!/usr/bin/gawk -f
BEGIN{
  FS = " *, *";
}
  {sub(/\%.*/,"")}         #Substitute comments with blanks                                                                                          
  {gsub(/[\'\"\`]/,"",$0)} #Remove any single or double quotes from this line                                                                      
  {gsub("'", "", $0)}      #Remove any single quotes                                                                                               

/^[ \t]*$/ {next}          #When blank line observed, go to the next line    

/^java/ {next}

{print $0}
\end{lstlisting}
\end{center}

\ssp
