Reputation: 9379
The following script reverses an install script (removes everything the other script installed). The script completes and does it task, but thereafter my terminal fails almost every command complaining that bash: /usr/bin/sudo: No such file or directory
I invoke the script as follows: bash -x remove-all.sh
Gives me a bugged terminal on both current Ubuntu and Suse I don't know enough about bash to know what causes this Can you help?
Thanks, Yucca
Code:
#!/bin/bash
sudo umount -a -t vboxsf
sudo rm -rf ~/idea-IC-111.167
sudo rm -rf ~/Desktop/netbeans-7.1.desktop
sudo rm -rf ~/.netbeans
sudo rm -rf ~/.m2
sudo rm -rf ~/NetBeansProjects
sudo rm -rf ~/IdeaProjects
sudo rm -rf /usr/lib/maven
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/bin/java
sudo rm -rf /usr/bin/mvn
sudo rm -rf /usr/bin/netbeans
sudo rm -rf /usr/bin idea.sh
echo 'done'
exit 0;
Upvotes: 0
Views: 355
Reputation: 16718
sudo rm -rf /usr/bin idea.sh
Aaaah! You're removing /usr/bin
recursively! Did you mean:
sudo rm -f /usr/bin/idea.sh
?
Upvotes: 5