Am trying to run a script every minute which will run another script in it and the output of capsuled script will be appended to a file..
crontab -e
Code:
## Min Hour Day Month Week
* * * * * ~/My_Scripts/auto.sh
auto.sh
Code:
Code:
#! /bin/bash
sh ~/My_Scripts/disk.sh >> ~/Baiglog.log
disk.sh
Code:
#! /bin/bash
clear
df -h | grep /dev/sda1 | awk '{print "Disk: Win C Drive Size:" $2," Used:" $3," Available:",$4}'
df -h | grep /dev/sda5 | awk '{print "Disk: Win D Drive Size:" $2," Used:" $3," Available:",$4}'
f -h |grep gvfs-fuse-daemon | awk '{print "Disk: Linux Drive Size:"$2," Used:"$3," Available:",$4}'
My cornd service is running!!
Am trying to learn shell scripting these days...
Cheers!!!