how to write wpa_cli out put write into text file

Viewed 82

I have to write p2p_find output into the file.

root@var-som-mx6:~/wl18xx-target-scripts/p2p# wpa_cli p2p_find > allout.txt 2>&1
root@var-som-mx6:~/wl18xx-target-scripts/p2p# P2P-DEVICE-FOUND 4c:34:88:38:5f:32 p2p_dev_addr=4c:34:88:38:5f:32 pri_dev_type=1-0050F200-0 name='MEET-PC' config_methods=0x11e8 dev_capab=0x25 group_capab=0x88 vendor_elems=1 new=0

root@var-som-mx6:~/wl18xx-target-scripts/p2p# 
root@var-som-mx6:~/wl18xx-target-scripts/p2p# cat allout.txt 
Selected interface 'p2p-wlan0-0'
OK
root@var-som-mx6:~/wl18xx-target-scripts/p2p# 

As per the sample code above, I receive a P2P-DEVICE-FOUND event on the terminal output window but it's not written into the text file. How to write an event of wpa_cli into the text file?

0 Answers
Related