I'm trying to write a script to keep track of my system information. I want to use "function" in the script and just call the functions out. I'm having trouble with the commands working in the function. Obviously they are written incorrectly.
#!/bin/bash
#function definition
function report_system_uptime()
{
echo $(($uptime))
}
function report_drive_space()
{
echo $(($df))
}
function report_home_space()
{
echo $(($du /home/* | sort -nr))
}
#Call the function
report_system_uptime
report_drive_space
report_home_space
uptime
,du /home
, etc.