看板 EE_DSnP 關於我們 聯絡資訊
※ 引述《spock ()》之銘言: : 抱歉,我不知道這是不是問題。 : spock@localhost /home/spock/dsnphw : $ ./SelfCheck b94901026_hw1.1.tgz : b94901026_hw1.1.tgz is self checking! : StudentID:b94901026 : Error: File b94901026 in your compressed file must remove. : Failed in self checking : spock@localhost /home/spock/dsnphw : $ tar zxvf b94901026_hw1.1.tgz : b94901026_hw1.1/ : b94901026_hw1.1/hw1.1.p1.txt : b94901026_hw1.1/hw1.1.p2.log : b94901026_hw1.1/hw1.1.p2.txt : b94901026_hw1.1/hw1.1.p2a.log : b94901026_hw1.1/hw1.1.p2b.log : b94901026_hw1.1/hw1.1.p2c.log : b94901026_hw1.1/hw1.1.p3.log : b94901026_hw1.1/hw1.1.p3.txt : b94901026_hw1.1/HW1.1.P4/ : b94901026_hw1.1/HW1.1.P4/a.cpp : b94901026_hw1.1/HW1.1.P4/a.h : b94901026_hw1.1/HW1.1.P4/b.cpp : b94901026_hw1.1/HW1.1.P4/b.h : b94901026_hw1.1/HW1.1.P4/hw1.1.p4a.make : b94901026_hw1.1/HW1.1.P4/hw1.1.p4b.make : b94901026_hw1.1/HW1.1.P4/main.cpp : b94901026_hw1.1/patterns : tarball 裡面還包含目錄本身,這個算是 bug 還是我不符合規定? I think the directory itself is not the problem such as "b94901026_hw1.1/HW1.1.P4/." I have already tested three testcases and did not occur this kind of problem. Maybe you could send your .tgz file to me. My E-mail: d95943039@ntu.edu.tw -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.217.141.253
spock:學長,我想我找到原因了。因為我複製 Must*.txt 兩個檔的 03/08 01:14
spock:文字內容時,滑鼠選擇區塊在最後一行多了一行空行。 03/08 01:15
spock:所以您寫的 script 第一次跑 foreach 比對到最後一項的時候 03/08 01:16
spock:對到空行,就會不符合條件。把空行拿掉就行了。 03/08 01:17
spock:只不過,我不清楚為什麼不是跑 &checkExist 的時候就出錯 03/08 01:18
spock:而是跑 &checkRemove 的時候才錯。我兩個 txt 最後都有空行 03/08 01:19