UnBooks:Unix Scripting/Chapter 1

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

Getting the Software[edit | edit source]

In order for you to be able to script, you will be forced to wipe out your entire hard drive and use Unix™. Yes, you will have to find a vintage copy of System V and install it on your system only to find out that VAX processors have been discontinued for years. Then, out of your frustration you will have to get SCO UnixWare, because it is true Unix, and if you use Linux McBride will personally hunt you down and eat your head.

Choosing the Right Distrobution[edit | edit source]

From your given shoices you have the option of UnixWare, OpenServer, and maybe even UnixWare. So choose very wisely, or you'll never be able to script properly. Of course, there's always Linux, and go ahead and use that if you don't value your head. Gentoo is one of the most user friendly distrobutions for you to use. Of course you can go with something harder like Ubuntu or SuSE if you're really up to the challenge.

Choosing the Right Text Editor[edit | edit source]

You have three choices for text editors - notepad, vi, and emacs. Since you ditched your Windows XP you will be forced to use Vi or emacs - basically a choice between confusing and messed up user intercation and keyboard limbo(WTF is the Alpha key?). Depending on what you hear from people argueing about these two text editors, you may say screw it and use ed, the real Unix Text Editor.

Starting Up[edit | edit source]

After setting up the required 14 partitions individually with no help when installing Unix, you will be asked to restart the computer and boot to your fancy text-based enviroment(Graphics are for SQUARES!). Depending on what you installed, you will get something like this after it is fully booted:

$_

In this case you will need to cough up money for the next lawsuit donation to the project, or pay for the painstaking script construction that the authors had to go through because micro$oft batch files are inferior to the superiour Unix script.

Anyways, there are other things that you may get when you start up also such as this:

Your_Name:Local_Machine:~>_

In this case you have probably installed Unix on a public computer in a library. I suggest you run like hell and hope you reach the border before they catch you and tear up your library card(those bastards...).

Your First Script[edit | edit source]

If you were able to get to a good command line then you will be able to get into a text editor and start scripting. Type in the name of your text editor into the command line and press enter. You are now in your text editor ready to go! In your text editor write the following code and save it to a file of your choice:

PRINT "Error parsing script on line 1. Press any key to continue..." SLEEP

Now quit your text editor and type this into the command line:

sh yourscript

If all goes well you should see this on your screen:

Error parsing script on line 1. Press any key to continue...

Congratualtions! You created your first dysfunctional script. Now move on to the next chapter to fuck with the parser some more. I'll be waiting.