手机的命令外壳 [英] Command Shell for a mobile phone
本文介绍了手机的命令外壳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在一个项目中,为Java支持的手机构建外壳(使用J2ME).我必须演示3个命令1)ls 2)top 3)cat.如何实现它们?请给我一些想法谢谢你.
I am working on a project for builiding a shell for a java enabled mobile phone(using J2ME).I have to demonstarte 3 commands 1) ls 2) top 3)cat .How to implement them?Plese give me some ideas.Thanking you.
推荐答案
Download Coreutils (it's the package which contains all of these commands): http://ftp.gnu.org/gnu/coreutils/coreutils-8.9.tar.gz.
将其打开,并找到每个源代码.我认为tarball组织得很好.
Rip it open, and find the source code for each one. I think the tarball is organized quite nicely.
以及其他语言的一些命令实现(我喜欢Python,因为它可读):
And some implementations of the commands in other languages (I like Python, as it's readable):
-
ls
: http://www.pixelbeat.org/talks/python/ls.py.html . -
cat
: http://www.unix.com/302420159-post2.html . -
top
是复杂的.祝你实施顺利!
ls
: http://www.pixelbeat.org/talks/python/ls.py.html.cat
: http://www.unix.com/302420159-post2.html.top
is complicated. Good luck implementing it!
这篇关于手机的命令外壳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文