[問題] awk 用法

看板Linux作者 (yshihyu)時間13年前 (2012/07/14 00:36), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串1/4 (看更多)
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 請問這可能是什麼原因造成? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.102.221 ※ 編輯: yshihyu 來自: 123.204.102.221 (07/14 00:41)

07/14 07:33, , 1F
試了一下應該是斷行問題 tr -d '\r' < input.log > out.log
07/14 07:33, 1F

07/14 07:34, , 2F
生一個新檔再試試看吧~
07/14 07:34, 2F

07/14 07:35, , 3F
然後我是這樣下的~awk '{print $3}' xxx.log | xarg -i
07/14 07:35, 3F

07/14 07:36, , 4F
objdump -h {}
07/14 07:36, 4F

07/14 21:36, , 5F
可以請問一下為什麼會有斷行問題產生 ?
07/14 21:36, 5F
文章代碼(AID): #1G04wQGL (Linux)
討論串 (同標題文章)
以下文章回應了本文
完整討論串 (本文為第 1 之 4 篇):
問題
1
5
文章代碼(AID): #1G04wQGL (Linux)