#!/bin/bash
#oef1
echo "voer de naam van het bestand in:"
read filename
if [ -e "$filename" ]; then
echo "het bestand '$filename' bestaat."
else
echo "bestand '$filename' bestaat niet."
fi
sudo crontab -e
0 15 * * 5 /home
-------------------------------------------------------------
#!/bin/bash
#oef2
echo "voer de naam van het bestand in"
read bestand
if [ ! -f "$bestand" ]; then
echo "het bestand bestaat niet."
exit 1
fi
grootte=$(stat -c %s "bestand")
grootte_kb=$((grootte /1024))
if [$grootte_kb -gt 1024 ]; then
echo "waarschuwing het bestand is groter dan 1MB($grootte_kb KB)."
else
echo "het bestand is klein ($grootte_kb KB)."
fi
sudo crontab -e
0 8 * * * /home
#oef1
echo "voer de naam van het bestand in:"
read filename
if [ -e "$filename" ]; then
echo "het bestand '$filename' bestaat."
else
echo "bestand '$filename' bestaat niet."
fi
sudo crontab -e
0 15 * * 5 /home
-------------------------------------------------------------
#!/bin/bash
#oef2
echo "voer de naam van het bestand in"
read bestand
if [ ! -f "$bestand" ]; then
echo "het bestand bestaat niet."
exit 1
fi
grootte=$(stat -c %s "bestand")
grootte_kb=$((grootte /1024))
if [$grootte_kb -gt 1024 ]; then
echo "waarschuwing het bestand is groter dan 1MB($grootte_kb KB)."
else
echo "het bestand is klein ($grootte_kb KB)."
fi
sudo crontab -e
0 8 * * * /home