testserver
如何在Bourne shell里截取一个字符串啊?
现在有一个形如abc-def.jar的文件名,需要截取abc及def
不能用bash,也不能用awk或者sed之类的,因为无法确定客户的机器上有没有安装。
谢谢!
walkerxk
[quote]原帖由 [i]liaosnet[/i] 于 2008-6-19 18:51 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8622539&ptid=1164901][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
那用什么??:em06: :em17:
有shell就会有awk/sed 的呀.. [/quote]
不一定,我可以删掉[img]http://bbs.chinaunix.net/images/smilies/icon_mrgreen.gif[/img]
毕竟不是必须的。我想嵌入式的系统里面应该没有的吧。