Hi Guys,

I'm quite new to shell scripting. I would like to create a script to the following:
1. dbf
2. Print "Filesystem" "kbytes" "used" "avail" "%used" "Mounted on" values where %used >= 80%.
3. email output to user(you@email.com)
4. The script should run once a day via cron every 10PM.

Hope to receive your reply soon guys... thanks in advance...

Hi Guys,

I'm quite new to shell scripting. I would like to create a script to the following:
1. dbf
2. Print "Filesystem" "kbytes" "used" "avail" "%used" "Mounted on" values where %used >= 80%.
3. email output to user(you@email.com)
4. The script should run once a day via cron every 10PM.

Hope to receive your reply soon guys... thanks in advance...

Put this into a file

#!/bin/bash
echo `df -h` | mail you@example.com

run these commands
chmod a+x myscript #make the file executable

crontab -e #edit the crontab

Then add this to the crontab:
0 22 * * * /home/me/myscript

make sense?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.