Need to send by shellscript every new string in Android logcat by curl POST command to server. Connected to Android by ADB. I was trying this things:
#logcat com.mm.en:I -e "chat"| tee /sdcard/Pictures/out.txt
It makes a file, and write every new string to it. Next i was trying:
#curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://nnnn.ru/test/testprint.php -G -d '{"id":"IDVALUE","name":"Mike"}'
It is also work. But when i trying to combine it by guide, it doesnt work:
#logcat com.mm.en:I -e "chat"| curl -H 'Content-Type: application/json' http://nnnn.ru/test/testprint.php -d @-
Where i`m wrong?
curl -X POST http://nnnn.ru/test/testprint.php -F "$(logcat com.mm.en:I -e "chat" -v raw)"
– Dru44 Mar 01 '21 at 08:12It send what i need, but only when i stop execution. Does not send every line separated "on-line"