I'm trying to make a bash script that opens a terminal, executes a command and then shuts down my computer when everything is finished.
I got everything working except the shutdown.
#!/bin/bash gnome-terminal -- bash -c "arguments='f'; bash '/home/hanne/myRender.sh' $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $arguments"
(The reason I put 'f' in a variable is because I get an error when I use 'f' instead of $arguments)
This also works when types in the terminal:
shutdown -P +3
But when I try to combine them, it seems to ignore the shutdown part (It closes the terminal window without error but also without shutting down):
#!/bin/bash gnome-terminal -- bash -c "arguments='f'; bash '/home/hanne/Documents/Design/Workflow - 3D/Scripts blender/myRender.sh' $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS $arguments; shutdown -P +3"
Anyone have tips for how I would achieve this?