I have this script:
#!/bin/sh
## Erase contents of all files in /var/log
find /var/log -type f -exec sh -c '> "{}"' \;
## Erase contents of bash history and shutdown
cat /dev/null > .bash_history
shutdown -h now
It used to work, but now everytime I run it it gives me this:
Shutdown scheduled for Thu 2013-07-18 21:03:08 UTC, use 'shutdown -c' to cancel.
Which isn't really that big of a deal as that's only one minute away, but it never used to do that. Not only that, if I run shutdown -h now on it's own in the terminal it shuts down immediately. Why would it behave differently in the script than on it's own in the command line?