Question: I receive two errors. Can someone please explain to me what's wrong with my file? The two errors are: 1. Line 39: unexpected EOF while
I receive two errors. Can someone please explain to me what's wrong with my file? The two errors are:
1. Line 39: unexpected EOF while looking for matching ' " '
2. Line 63: syntax error: unexpected end of file
TITLE="Name System Information for $HOSTNAME"
RIGHT_NOW=$(date +"%x %r %z")
TIME_STAMP="Updated on $RIGHT_NOW by $USER"
system_info()
{
echo "
System release info
"echo "
Function not yet implemented
}
show_uptime()
{
echo "
System uptime"
echo "
""uptime
echo "
}
drive_space()
{
echo "
Filesystem space
"echo "
""df
echo "
}
function home_space
{
if [ "$(id -u)" != "0"; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
if [ "$(id -u)" = "0" ]; then
echo "
Home directory space by user
"echo "
""echo "Bytes Directory"
du -s /home/* | sort -nr
echo "
fi
}
df
echo ""
}
function home_space
{
if [ "$(id -u)" != "0"; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
if [ "$(id -u)" = "0" ]; then
echo "
Home directory space by user
"echo "
""echo "Bytes Directory"
du -s /home/* | sort -nr
echo "
fi
}
cat <<- _EOF_
$TITLE
$TIME_STAMP
$(system_info)
$(show_uptime)
$(drive_space)
$(home_space)
