中的分段錯誤我想將u3-工具(http://u3-tool.sourceforge.net/)的輸出轉換爲變量。 沒有重定向流的結果是:u3工具在bash管道中不起作用| C
$ echo "pass" | sudo -S sh -c "u3-tool -i /dev/sdc"
Total device size: 1.88 GB (2022703104 bytes)
Segmentation fault
,但如果我的管道重定向到一個文件:echo "pass" | sudo -S sh -c "u3-tool -i /dev/sdc > /tmp/u3info 2>&1"
,然後我得到的只有第二行Segmentation fault
!
有沒有人有想法? 「stdout」中的「Total device size:1.88 GB(2022703104 bytes)」是什麼?
什麼是語言C的Segmentation fail
?我如何解決它?
敬意和聖誕快樂!
使用是Linux Mint的17.3
u3-tool-Fix:https://github.com/marcusrugger/u3-tool/pull/2/files – user4742258