When i am trying below code getting error like -
+ awk '{if ($1 > 1)
{ print "Memory utilisation is high \n Please find history of the memory utilisation below"
sar -r|awk {print' ',,,}| column -t }
}'
awk: cmd. line:2: sar -r|awk {print
awk: cmd. line:2: ^ syntax error
awk: cmd. line:3: sar -r|awk {print
top -M -n1 | grep "Mem" | awk '{print 0 + $7}' | awk '{ print $1 / 1024 }' | awk '{if ($1 > 1)
{ print "Memory utilisation is high \n Please find history of the memory utilisation below"
sar -r|awk '{print $1,$2,$3,$4}'| column -t }
}' >>/home/shyam/utilisation.txt
How should i redirect two outputs to the file?