Hello All,
I am writing an shell script but abruptly its not able to recognize switches in echo statement.
#!/bin/bash
top -n 1 -b>ankit
host=`hostname`
time=`cat ankit|grep load|tr -s " "|cut -d " " -f3`
load=`cat ankit|grep load|tr -s " "|cut -d "," -f4|cut -d ":" -f2`
mem=`cat ankit|grep Mem`
swp=`cat ankit|grep Swap`
echo "Machine Name: $host">>mcs
echo "Time when snapshot taken $time">>mcs
echo "\n\n current Load Average of the system is$load">>mcs
echo "\t\t Memory Utiliztion on the server">>mcs
echo
cat mcs|mail -s "Top Usage Report" b36376@freescale.com
output
#########
Machine Name: zin33cde01
Time when snapshot taken 16:18:45
current Load Average of the system is 5.45 \t\t Memory Utiliztion on the server
###########
like in the above output ist not parsing \t\t for tabing.
Regards
Ankit