Hi Dr. Wilde, <div><br></div><div>I am able to readData from the input now, into an array of string.  I am currently trying to use the strcut and strcat to cut the ".tif" and replace it with "Colored.tif"</div>
<div><br></div><div>I tried to do something like this: </div><div><br></div><div><div>string cutresult = @strcut(output[0],"/home/wilde/bigdata/data/modis/output/");</div><div>#outfile = eccho(output[0]);</div><div>
trace(output[0]);</div><div><br></div><div><br></div><div>and the error is :</div></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 17px; "><font class="Apple-style-span" face="Consolas, 'Andale Mono', monospaced"><font class="Apple-style-span" color="#202080"><b><div>
RunID: 20100122-0951-345qqi15</div><div>Progress:</div><div>SwiftScript trace: /home/wilde/bigdata/data/modis/output/h11v05.tif</div><div>Execution failed:</div><div>        java.lang.IndexOutOfBoundsException: No group 1</div>
<div><br></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; font-weight: normal; line-height: normal; "> </span></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;">I don't understand why I got the error IndexOutOfBounds, I have checked the string using a procedure that echo the string to a file, and as you can see from above I also checked it with trace(output[0]) which produces a valid value. </span></font></div>
<div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br></span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br>
</span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;">-Antonius</span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br>
</span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br></span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;">ps. </span></font></div>
<div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br></span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;">This is the whole test file named mini.swift </span></font></div>
<div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><br></span></font></div><div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small; font-weight: normal; line-height: normal;"><div>
type file;</div><div>file input <"input_for_mini_test.txt">;</div><div>string output[] = readData(input);</div><div>file outfile <"output_for_mini_test.txt">;</div><div>string color = "Colored.tif";</div>
<div><br></div><div>app (file out) eccho (string inputStr)</div><div>{</div><div>        echo inputStr stdout=@out;</div><div>}</div><div><br></div><div>outfile = eccho(output[0]);</div><div>string cutresult = @strcut(output[0],"/home/wilde/bigdata/data/modis/output/");</div>
<div>trace(output[0]);</div><div><br></div><div>--EOF--</div><div><br></div></span></font></div></b></font></font></span></div>