0
我想修剪adb中的字符串。 如果我寫busybox --help它會列出cut和sed作爲可用命令。在Android busybox中使用cut或sed
mount |grep -e /system
作品,但
mount |grep -e /system| cut -f 1 -d ' '
不起作用。 Android的busybox中是否有特殊的語法? 我也試過
echo "Hello World"|cut -f 1 -d ' '
的手冊頁
,它不工作..
[email protected]:/ # busybox cut --help
busybox cut --help
BusyBox v1.21.1-Stericson (2013-07-08 15:58:11 BST) multi-call binary.
Usage: cut [OPTIONS] [FILE]...
Print selected fields from each input FILE to stdout
-b LIST Output only bytes from LIST
-c LIST Output only characters from LIST
-d CHAR Use CHAR instead of tab as the field delimiter
-s Output only the lines containing delimiter
-f N Print only these fields
-n Ignored
1 CH eck可用選項'cut --help' –
爲問題增加了可用選項。 – PdXY
只需將busybox添加到該行,它就可以工作。這是一樣的 '斬--help' 不起作用,但 'busybox的削減--help' 一樣。 'mount | grep -e/system | busybox cut -f 1 -d''' – PdXY