You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CubeSatSim/log

28 lines
944 B

#!/bin/bash
echo -e "\nLog file script for CubeSatSim\n"
echo "To exit, type Control-C"
echo
sleep 2
if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then
sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt
# cat /home/pi/CubeSatSim/logt.txt
# echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt"
elif [ "$1" = "-c" ]; then
sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt
cat /home/pi/CubeSatSim/logc.txt
# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt"
elif [ "$1" = "-p" ]; then
sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt
cat /home/pi/CubeSatSim/logp.txt
# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt"
else
sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt
# cat /home/pi/CubeSatSim/log.txt
# echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt"
fi

Powered by TurnKey Linux.