Miscellaneous Linux Code
#!/bin/bash
sudo /home/pi/MMA8451cpp/mma8451/setup.sh
killall -9 read8451
sleep 10
/home/pi/MMA8451cpp/mma8451/read8451 > /home/pi/acceleration/data/`date +\%Y-\%m-\%d_\%H:\%M:\%S` 2> /home/pi/acceleration/data/`date +\%Y-\%m-\%d_\%H:\%M:\%S`.log
This kills the running code, gives it some time to kill and then begins running it again. The arrows (>) are used to send data to different folders/files. Output gets sent to one and error to another.
sudo /home/pi/MMA8451cpp/mma8451/setup.sh
killall -9 read8451
sleep 10
/home/pi/MMA8451cpp/mma8451/read8451 > /home/pi/acceleration/data/`date +\%Y-\%m-\%d_\%H:\%M:\%S` 2> /home/pi/acceleration/data/`date +\%Y-\%m-\%d_\%H:\%M:\%S`.log
This kills the running code, gives it some time to kill and then begins running it again. The arrows (>) are used to send data to different folders/files. Output gets sent to one and error to another.
Comments
Post a Comment