The Unnecessarily Feature-laden Bash Script Game
The aim of this thread is to post a bash script that works but has too many features to warrant it's existence.
Sample:
Code:
#!/bin/bash
#runs frostwire
frostwire
clear
xmessage -center "hello, `whoami`" -buttons "Hey There":0]
if [ "`whoami`" == "kurse" ]
#change "kurse" to your username and change all subsequent kurses as well
then
echo "Welcome kurse.. let's sync your new stuff"
#edit this to say whatever or just delete it
cd /home/kurse/Shared
ls > /home/kurse/Desktop/~listmusic
xmessage -center -file /home/kurse/Desktop/~listmusic
#a nice little popup tells you what is about to be copied
cp /home/kurse/Shared/* /home/kurse/Desktop/Frostwire
#assuming you have created a folder called Frostwire on your desktop
xmessage -center All Files Synchronized
sudo rm -rf /home/kurse/Shared/*
#all files in Shared are removed and no longer shared with the world
#I wonder.. does this make downloading copyrighted material less illegal?
clear
echo -e '\E[33;44m'"cleaning up..."; tput sgr0
banner -w25 "OK!"
sudo rm -rf /home/kurse/Desktop/~listmusic
touch /home/kurse/Desktop/~listmusic
cd /home/kurse/Shared/
ls > /home/kurse/Desktop/~listmusic
echo "All Done Here!"
read -p "press enter to EXIT" var
#just makes you press enter unecessarily
exit
else
echo "You are not kurse, perhaps you copied this and didn't change things properly to work with your system";
exit
fi .
sadly all that was needed in this case was to copy files from one dir to another !
please post your overly-featured bash scripts (one at a time pls) and also feel free to participate by guessing exactly how many of the lines in the script were valid but totally unecessary!
Edit: Don't run anyones unnecessary scripts unless you know what they are overdoing.
Last edited by |{urse; April 28th, 2008 at 03:38 AM.
clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="☠" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"
Bookmarks