* Use a parameter within a pig script and provide value through running a binary or script.
*/
@Test
public void testShellCommand() throws Exception{
log.info("Starting test testShellCommand()");
ParameterSubstitutionPreprocessor ps = new ParameterSubstitutionPreprocessor(50);
pigIStream = WithConditionalReplacement(basedir + "/input4.pig", "sh test/org/apache/pig/test/data/generate_date.sh",
"test/org/apache/pig/test/data/generate_date.bat", Shell.WINDOWS);
pigOStream = new FileWriter(basedir + "/output1.pig");
String[] arg = null; //{"date=`sh generate_date.sh`"}; //`date \\T`"};
String[] argFiles = null; // {basedir+"/ConfFile1.txt"};
ps.genSubstitutedFile(pigIStream , pigOStream , arg , argFiles);
FileInputStream pigResultStream = new FileInputStream(basedir + "/output1.pig");
pigExResultStream = new FileInputStream(basedir + "/ExpectedResultDefault.pig");
BufferedReader inExpected = new BufferedReader(new InputStreamReader(pigExResultStream));
BufferedReader inResult = new BufferedReader(new InputStreamReader(pigResultStream));