public class Test200 {
public static void main (String args []) {
System.out.println("David");
System.out.println("Peter");
}
}
output=$(java Test200)
echo $output
I get the both value which are David Peter. Let say I only want "David" to be returned in shell script ? Any clue ? Thanks.