歡迎您光臨本站 註冊首頁

哪個大神來幫幫我

←手機掃碼閱讀     火星人 @ 2014-03-24 , reply:0

學校里的選修課選的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.


幫幫忙啊!!!

[火星人 ] 哪個大神來幫幫我已經有460次圍觀

http://coctec.com/docs/linux/show-post-139314.html