2019-11-11 More

#!/bin/bash
# ~/bin/cmot
  
tmot=md-`date +%Y%m%d`
if [ -f ~/compm ]; then
        # mv ~/todaym ~/compm
        if [ -f ~/`cat ~/compm` ]; then
                motd > ~/todaym
                diff -y ~/todaym ~/`cat ~/compm`
                rm -i ~/`cat ~/compm`
                rm ~/todaym
                rm ~/compm
        else
                echo "file missing ~/'cat ~/compm'"
                exit 1
        fi
else
        motd > ~/${tmot}
        echo ${tmot} > ~/compm
        echo "motd stored"
fi
	

home...archive




Click for the [ Random page ]
Want to join the ring? Click here for info.