红联Linux门户
Linux帮助

哪个大神来帮帮我

发布时间:2013-11-15 14:24:46来源:红联作者:mzydear
学校里的选修课选的unix,但是完全听不懂。。。现在有coursework ,但是我自己的主专业都忙不过来了,希望大神帮帮我,小弟感激不尽!!!(6)m:b
下面是题目:
The SOBJ le format is used to store 3D object de nitions for 3D graphics software. SOBJ les are text
les that consist of 3 di erent types of line:
 Lines beginning with # are comments and the contents of the line are ignored.
 Lines beginning with v are vertex de nitions (points in 3D space). These lines then have 3
oating-
point numbers which represent the x, y, and z coordinates of the vertex. The coordinates may be
positive or negative numbers. Each element of the line is separated by whitespace.
 Lines beginning with f are face de nitions (surfaces in 3D space). These lines have 3 or more integers
(that are greater than 0) that are index numbers referring to vertices that are de ned in the same
le. Notionally, the upper limit for these numbers is equal to the number of vertex de nitions in the
le however this upper limit does not need to be checked. Each element of the line is separated by
whitespace.
Write a sed script called validate_sobj.sed which takes a le name as an argument and prints any
lines of the le which are not valid according to the above rules, with the exception that you do not have
to check the upper limit of vertex index numbers in face de nitions as noted above.

还有一题:
Write a shell script dup_checker.sh which takes a single argument, the pathname of a directory, and
checks if the contents of any of the les inside that directory are likely to be duplicates of each other,
using the md5sum command. If the md5sum value of two les are the same then their content is likely
to match. Files that are likely duplicates should have their le names printed in groups, such that each
of the le names in each group are all printed on a single line, starting with the number of les in that
group and with each le name separated by a space.
Example output (the /usr/local/unnc/ae1ust/cw1/dupdir directory contains some les you can use
to test your solution with):
[user@machine ~]$ ./dup checker.sh /usr/local/unnc/ae1ust/cw1/dupdir
3 unnc-logo-draft-20100504.jpg logo-2009.jpg EMAIL HeaderImage.jpg
2 business-template.svg blank-cards-for-peter.svg
[user@machine ~]$
This shows there are two groups of similar les. The rst group has the 3 les unnc-logo-draft-20100504.jpg
logo-2009.jpg EMAIL HeaderImage.jpg with the same md5sum value, and the second group has 2 les
business-template.svg blank-cards-for-peter.svg with the same md5sum value.


帮帮忙啊!!!
文章评论

共有 8 条评论

  1. 秦时明月楼 于 2013-12-10 16:57:58发表:

    不知你这个考得是英语还是操作系统:0wl;l1

  2. zdl_361 于 2013-11-27 11:54:02发表:

    这一题我在百度上看到一个人发了一样的题目。
    可是他连文件都不提供。光看描述怎么知道文件结构。
    怎么写的出代码,怎么做测试?
    提问也要细心。资料都不全,不想浪费精力。

  3. ninemoonsword 于 2013-11-25 15:34:22发表:

    支持顺便刷任务没现金啥都干不了

  4. gr23344 于 2013-11-18 23:04:10发表:

    这个比较难 我只是路过。

  5. 青春不朽 于 2013-11-17 12:07:37发表:

    表示英文亚历山大,翻译过后会有人帮助你的oo

  6. mcchenyao 于 2013-11-17 12:04:05发表:

    (5ty(

  7. 瀚哥就是要数猫 于 2013-11-16 13:24:51发表:

    不要晒英文好么,先去翻译一下在贴,不是哥看不懂英文,而是哥确实看不懂,查字典很痛苦,你总不能叫别人去查字典吧?我相信你翻一下后会有更多人帮你

  8. Ptosassy 于 2013-11-16 08:50:02发表:

    帮不上忙,帮顶下