3
ps -aux | grep -E "^.*\b[^grep](python).*(runserver).*$" 2>/dev/null | tr -s " " | cut -d " " -f 2
它返回正確的結果。 (例如)
1450
1452
在R此相同的代碼
vLog <- system('ps -aux | grep -E "^.*\b[^grep](python).*(runserver).*$" 2>/dev/null | tr -s " " | cut -d " " -f 2', intern = TRUE)
回報character(0)