#!/bin/bash if [ "$(ps -e | grep recieve)" != "" ];then ps -e | grep recieve && tail -n 6 $(ls /home/lucas/.LOG/MS* | tail -n1) else printf "recieveMS inactive\n" fi