You can run a script at shutdown by following the instructions here.
Basically, you can place the script in
/etc/rc6.d/, and make it executable. The one drawback with this approach is that any script in the above directory will run as the root user, which can change file permissions and cause issues later. The alternative is to leave your script in your home directory, and add the following script in
sudo -u kaustab /home/kaustab/backup_work.sh
Finally, you should remove the call to
read as well (or add a timeout), since it will ask you for a keypress before shutting down and block the shut down.
The rc6.d script approach above is the legacy sysv-init approach to running scripts at shutdown. With newer versions of Debian/Ubuntu, it's safer to use a systemd unit file to run the script at shutdown.
Place the following script in
/etc/systemd/system/backup-work.service (source) and run
sudo systemctl daemon-reload
Description=Backup work directory
Before=shutdown.target reboot.target halt.target
# This works because it is installed in the target and will be
# executed before the target state is entered
# Also consider kexec.target
ExecStart=/home/kaustab/backup_work.sh # your path and filename
WantedBy=halt.target reboot.target shutdown.target