Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- dir=/home/pi/output/
- mkdir -p "$dir"
- output="${dir}$(date +%s)"
- rtl_power -f 314M:316M:1M -g 300 -i 1 |while read l
- do
- echo "$(date +%s) - POWER - $l" >> "${output}_1"
- done &
- cat /dev/ttyS0|while read g
- do
- echo "$(date +%s) - $g" >> "${output}_2"
- done &
- echo "press enter to continue"
- read
- killall rtl_power
- ps aux|grep ttyS0|awk '{print $2}'|while read pid
- do
- kill $pid
- done
- cat ${output}_1 ${output}_2 > ${output}_3
- sort ${output}_3 > ${output}
- rm ${output}_*
- echo "Thank you and have a nice day."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement