Fun Shell Scripts
Now it's time to really think about what you can do with scripts.
Yes, a shell script can take a complex task such as impressing
the heck out of your friends, and make it possible for you to
do by giving just one command per cool stunt.
If you are a bit of a prankster, you could create a
bunch of scripts and use them to make your friends think you
have a special, super duper operating system. And in fact you
really will, honestly, be in control of the most special, wonderful
operating system on the planet. The beauty and power of Unix
is that it is so easy to customize it to do anything and everything!
Windows no! Unix yes!
****************************************************
Evil Genius tip: Bring up the file .login
in Pico. It controls lots of what happens in your shell account.
Want to edit it? You could totally screw up your account by changing
.login. But you are a hacker, so you aren't afraid, right? Besides,
if you mess up your shell account, you will force yourself to
either learn Unix real fast so you can fix it again, or else
make friends with tech support at your ISP as your try to explain
why you accidentally mapped the letter "e" to mean
"erase." (I did that once. Hey, no one's perfect!)
For example, do you have to put up with some babysitter menu
every time you log in? Do you see something that looks like /usr/local/bin/menu"
in .login? Put a "#" in front of that command (and
any other ones you want to put to sleep) and it won't execute
when you login. Then if you decide you are sorry you turned it
off, just remove the "#" and that command will work
again.
Damian adds "Of great importance to newbies and
a sign of great
intelligence in advanced Unix gurus is backing up before you
screw it up, i.e., in your pico of .cshrc. Their command
lines should contain: mkdir .trash;chmod 700 .trash;cp .cshrc
.trash; pico .cshrc.
"Or, make the following alias in your .cshrc after
creating your
'.trash'directory: alias backup 'cp \!$ ~/.trash' "When
you next source the .cshrc, you just type 'backup filename' and
it will be copied into the .trash directory in case you need
it later. "Modify the startup script, save the changes
and then telnet in a second
time to see if it works. If it doesn't, fix it or 'cp ~/.trash/.cshrc
~'. I
don't recommend you 'source' the newly modified file because
if it's
screwed, so are you. It's always best to keep one session
untarnished, just in case. If it works OK on your 2nd login,
then you can 'source .cshrc;rehash;' in your first window to
take advantage of the changes made."
*******************************************************
OK, now how about just cutting loose and playing with
scripts? See what wonderful things you can do with them. That's
what being a hacker is all about, right? And thanks to Blips,
a great fan of the Bastard Operator from Hell, for reviewing
and contributing to this Guide. Check out his Web site at http://bofh.mysite.org. Parental
discretion advised:)
________________________________________________________
Where are those back issues of GTMHHs and Happy Hacker Digests?
Check out the official Happy Hacker Web page at http://happyhacker.org.
We are against computer crime. We support good, old-fashioned
hacking of the kind that led to the creation of the Internet
and a new era of freedom of information. So don't email us about
any crimes you have committed! To subscribe to Happy Hacker and
receive Unix/Linux shell accounts and shell programming, please email
with message "subscribe
happy-hacker" in the body of your message.
© 1997 Carolyn P. Meinel, . You
may forward or post this GUIDE TO (mostly) HARMLESS HACKING on
your Web as long as you leave this notice at the end.