- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
import java.util.*;
public class Shell {
Shell(){
main();
}
private void main(){
boolean flag=true;
String c;
while(flag){
c=Kernel.stdin("#");
String out=exec(c);
Kernel.stdout(out);
}
}
public static String exec(String cmd){
String tmp="";
Lib_parse.line(cmd," ");
String c=Lib_parse.get(0).toLowerCase();
if(c=="help"){
tmp.concat("uname - get the OC version \n");
tmp.concat("echo - echo input phraze \n");
}
if(c=="uname"){
tmp.concat("L2ME Kernel v1.3 - Linux 2 Java ME (c) new_user \n");
}
if(c=="echo"){
tmp.concat(cmd.substring(4,cmd.length()-1)+"\n");
}
return tmp;
}
}
Gukl 10.02.2010 13:18 # 0
Pyth_ON 10.02.2010 13:19 # 0
guest 10.02.2010 14:08 # 0
guest 10.02.2010 21:19 # 0
мило
Altravert 12.02.2010 14:58 # +1