shutdown bash script

you can remove the first 2 echos if you like.

#!/bin/bash

echo -e “Welcome to auto shutdown”

sleep 1

echo -e “Brught to you by Mohamed Adel”

sleep 1

echo -e “Please insert the time you want the computer to shutdown at in Minutes. 

For example : ‘5’ will auto shutdown after 5 minutes.” 

read time

notify-send “Your system is going to auto shut down in $time minutes”

sudo shutdown -P  $time | echo -e “Now enter your password, set back and relax :)”