Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- rm /tmp/315.grep 2>/dev/null
- touch /tmp/315.grep
- function watchrtl {
- rtl_fm -f 315000000 -F -C -l 55 | xxd | grep -v ": 0000 0000 0000 0000 0000 0000 0000 0000" > /tmp/315.grep
- }
- function cleanup {
- kill $WATCH_PID
- killall rtl_fm
- exit 0
- }
- watchrtl &
- export WATCH_PID=$!
- trap 'cleanup' SIGINT
- sleep 10
- ORIG_SIZE=`ls -la /tmp/315.grep | cut -f5 -d' '|tr -d "\r\n "`
- CUR_SIZE=`ls -la /tmp/315.grep | cut -f5 -d' '|tr -d "\r\n "`
- echo Waiting...
- while [[ "$CUR_SIZE" == "$ORIG_SIZE" ]]
- do
- sleep 1
- CUR_SIZE=`ls -la /tmp/315.grep | cut -f5 -d' '|tr -d "\r\n "`
- done
- echo
- echo "HELLO PROFESSOR FALCON"
- echo
- cleanup
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement