看板 Linux 關於我們 聯絡資訊
find每一次被叫出來的時候,會把硬碟重翻一次... (如果aa,bb太大,沒有被全部cache起來) 不如先用find把檔案列出來 find "path of aa" > aafile find "path of bb" > bbfile awk '{print $1}' out.log | while read file; do grep -q $file aafile && __do_when_found || { grep -q $file bbfile && __found_in_bb || { ... } done 把東西都寫在 aafile, bbfile, out.log中 這幾個小檔案應該會被留在快取裡 ※ 引述《yshihyu (yshihyu)》之銘言: : ※ 引述《yshihyu (yshihyu)》之銘言: : : http://pastebin.com/ayhZ5Zrj //程式碼 : : http://pastebin.com/WrPL5sp5 //baseaddr_so.tmp.log : : awk '{system("objdump -h "$3" | grep 'text' ");}' baseaddr_so.tmp.log : : 就顯示No such file/yshihyu/android/out/target/product/test/symbols/system/lib : : /lights.tegra.so : : 好像缺掉 /home ... : : 正確是/home/yshihyu/android/out/target/product/test/symbols/system/lib/lights.tegra.so : : 但我改成 awk '{system("echo "$3" ");}' baseaddr_so.tmp.log 可以正確印出路徑 : : 所以$3 路徑正確~我主機好像也有對應的.so : : 請問這可能是什麼原因造成? : : 謝謝 : awk '{system(" find /home/yshihyu/aa -name "$1"");}' out.log > result.log : 如果我在 /home/yshihyu/aa 路徑底下找不到$1字串 再去 /home/yshihyu/bb 路徑找 : 請問要怎麼判斷是否找不到, 如果找不到要怎麼讓它再去/home/yshihyu/bb 是否有$1字串 : awk '{system(" find /home/yshihyu/aa -name "$1"");}' 要怎麼加上判斷&再去其他 : 路徑找? : 謝謝 -- 最近得了一種一登入就打 ls<return> 的病..... 呃... 有誰不知到 $HOME 裡有什麼?... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.245.32
soem:最近在windows上也得了同一種病..所以我裝了gnuwin32 07/16 01:55
kdjf:我覺得有呆到的點是:誰會不知到~/裡面有什麼啊... 07/16 15:24
MOONRAKER:我的~有公司git的一大堆code達2G 除了直接跟我有關的部 07/16 16:14
MOONRAKER:份以外其他我根本不知道 還是你都知道我 ~ 裡有什麼!? 07/16 16:15
kdjf:樓上XD 07/16 18:12