View Single Post
  #4 (permalink)  
Old 25-10-2007, 12:08 PM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Simple sample script:

Code:
#!/bin/bash
OUT=report.out.txt
>$OUT
echo "Hostname : $(hostname)" >> $OUT
echo "Date : $(date)" >> $OUT
echo "Memory info: " >> $OUT
free -m >>$OUT
echo "Disk info: " >> $OUT
df -h >>$OUT
scp $OUT you@somewhere.com
# mail -s "Sys Info" you@somewherelese.com < $OUT
Now write and modify script as above.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote