View Single Post

  #4 (permalink)  
Old 10-25-2007, 12:08 PM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 838
nixcraft is an unknown quantity at this point
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 | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote