RPi3에서 Raspbian (실제로는 HASSBian)을 사용하고 있습니다.netcat에서 awk로 stdout을 전달할 수없는 이유는 무엇입니까?
[email protected]:~ $ netcat localhost 1099 | grep -i on
01/01 22:57:29 Rx RF HouseUnit: C2 Func: On
01/01 22:57:30 Rx RF HouseUnit: B4 Func: On
01/01 22:57:31 Rx RF HouseUnit: B5 Func: On
01/01 22:57:32 Rx RF HouseUnit: B6 Func: On
01/01 22:57:40 Rx RF HouseUnit: C1 Func: On
01/01 22:57:47 Rx RF HouseUnit: C2 Func: On
01/01 22:58:03 Rx RF HouseUnit: C2 Func: On
01/01 22:58:04 Rx RF HouseUnit: C1 Func: On
을하지만 파이프하려고 할 때이 내가 어떤 출력을 얻을 원하는 두 개의 필드를 꺼내 awk가에 : 나는 netcat을 출력을 구문 분석하는 데 노력하고있어. 다음과 같이 보입니다 :
[email protected]:~ $ netcat localhost 1099 | grep -i on | awk '{print $6,$8}'
나는 이것이 단지 작동해야한다고 생각하는데 잘못 되었습니까?
[email protected]:~ $ uname -a
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
가에서 봐 주시기 바랍니다 : [내가 뭘해야 누군가가 내 질문에 대답 할 때합니까?] (http://stackoverflow.com/help/someone-answers) – Cyrus