======Part 3======
=====Entries=====
====November 3, 2011====
Today was an interesting class. We played with regular expressions and dewebified an html document. Simply put, we were data mining a a web page from its html format to a format that was much easier to read and understand. We took the information gathered and also rearranged it to the format we would have preferred to see it in. This was good as it was more play with regular expressions as well as unzipping a gzipped archive. This is very useful as a future refernce to a problem that may be encountered.
====November 15, 2011====
Today we looked at IP addressing in Unix. This was a great tie-in to all the IP configuration that I just finished learning about in Network Fundamentals. I see that it is all the same thing just under a different name and settings.
====Novemeber 17, 2011====
Today I worked on the webpage project. I have never worked with html before so I had to look up how to actually write the code. I will say that it is not as difficult as it may seem but at the same time it is a bit of a challenge. I am still struggling with the images but in time I should be able to get it worked out.
====November 30, 2011====
Today is the last day for the Opus Part 3. I haven't been working on it as studiously as the other parts. It's getting down to the end of the semester and the class is winding down. I think I am more in shock over how fast the semester flew by and the fact that all that is left is the end of course experience.
=====unix Topics=====
====Links====
Links are special files that share resources and direct the user to another location where other types of files may be located. In Unix they are typically symbolic links.
lab46:~$ ls
lab46:~$ **Maildir** bin closet **data** public_html src src.bak
Note: The starred directories are symbolic link directories
The Maildir and data directories provide links to files located in other directories in the Unix system. The lib directory in Unix is also a link that provides access to other files.
====Multitasking====
Multitasking is the process of working on or accomplishing more than one task at one time.
lab46:~$ ps
This command will show the user all the processes they are running
====Pattern Matching====
Finding a similarity in a file and using tools such as grep and sed to find the pattern that is specified. it is a quick way to find all the needed information in a large file when only a tiny fraction is needed and also trim off the excess.
lab46:~$ cat spring2012-20111103.html|sed 's/ddtitle/dddefault/g'|grep 'dddefault'
This snippet of code is looking for the patterns of ddtitle and dddefault in the file spring2012-20111103.html. Both sed and grep are searching for and will match the given patterns so that only the lines containing them will be given.
====Backgrounding a Process====
Taking a process and running it in the background while working on something else.
lab46:~$ sort bigfile > bigfile.sort &
[1] 29890
lab46:~$
The ampersand, &, places the process in the background to free up the terminal
====Foregrounding a process====
Taking a process that is in the background and bringing it to the front, foreground, so that you can actively work on it.
lab46:~$ sort bigfile > bigfile.sort fg
lab46:~$
This brings the previously backgrounded process to the foreground
====Signals====
The electronic impulse that lets the system know a process has been done or is being done.
lab46:~$ kill -9 54896
The above shows that the process 54896 is being sent a kill signal.
====Local Host====
The computer that you are currently using. It can be reached by using the loopback.
lab46:~$ ping 127.0.0.1
This contacts the local host to make sure it is sending and receiving packets properly.
====Remote Host====
A computer that is a distance away from the computer being used to access it.
A x-window system works somewhat like a remote host. When we used the video wall in class that was a remote host.
====X Window System====
Similar to unix and utilizes a graphical interface. It allows for processes to be run and is also capable of multitasking.
gazelle: xeyes
This is a command prompt in the x window system that will output a pair of eyes to the screen.
====Extended Regular Expressions====
An extension to regular expressions that allows more pattern matching and grouping
lab46:/usr/share/dict$ cat words|grep '^[aeiouy]|[731089]$'
This should look for words that contain the vowels OR the numbers indicated. The | is an extended regular expression meaning or.
====Shell Scripting====
writing a program that will execute within the unix environment
#!/bin/bash
echo "please enter password: "
done
this is a script that should prompt the user to enter a password.
====$Path====
Shows the absolute path that something will take while traversing unix.
lab46:~$ echo $PATH
/home/swilli31/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
=====unix Objective=====
====Objective====
Understanding and implementing pattern matching
===Method===
Read books and follow html example from class. Try to do some matching on my own. Use grep and sed to obtain information I am looking for.
===Measurement===
I was able to match some patterns but I need to work more on grep, sed, and regular expressions
===Analysis===
The class example was a good jumping off point to learn pattern matching. It had many entries that could easily be narrowed down to what was most important.
I am now able to recognize patterns when given a a file but I still need to work more with using grep and sed to become more comfortable with using them.
=====Experiments=====
====Experiment 1====
===Question===
Can I create an x-window client from within the Unix shell
===Resources===
Using knowledge from class and some reading
===Hypothesis===
I will not be able to create an x-window host from within Unix
Rationale: We used a separate terminal from the drop menu to get an x-window client
===Experiment===
Find a command that can create x-window within unix and execute
===Data===
I tried to use the command DISPLAY=unix/ :0.0 ./test nad the ./test command which should have at least brought up a netstat page for x-window but instead nothing cam up. When I tried lsof I got a bunch of permission denied for various users.
===Analysis===
There was no manual page for x-window. I was not able to do what I wanted.
===Conclusions===
While I was not able to create an x-window from within the unix shell but I also do not think that this failed experiment can count as proving my hypothesis correct due to the lack of proper information.
====Experiment 2====
===Question===
How can I redirect STDOUT and STDERR?
===Resources===
Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.
===Hypothesis===
Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.
State your rationale.
===Experiment===
How are you going to test your hypothesis? What is the structure of your experiment?
===Data===
Perform your experiment, and collect/document the results here.
===Analysis===
Based on the data collected:
* was your hypothesis correct?
* was your hypothesis not applicable?
* is there more going on than you originally thought? (shortcomings in hypothesis)
* what shortcomings might there be in your experiment?
* what shortcomings might there be in your data?
===Conclusions===
What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.
====Retest====
If you're doing an experiment instead of a retest, delete this section.
If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:
===State Experiment===
Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.
===Resources===
Evaluate their resources and commentary. Answer the following questions:
* Do you feel the given resources are adequate in providing sufficient background information?
* Are there additional resources you've found that you can add to the resources list?
* Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
* If you find a deviation in opinion, state why you think this might exist.
===Hypothesis===
State their experiment's hypothesis. Answer the following questions:
* Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
* What improvements could you make to their hypothesis, if any?
===Experiment===
Follow the steps given to recreate the original experiment. Answer the following questions:
* Are the instructions correct in successfully achieving the results?
* Is there room for improvement in the experiment instructions/description? What suggestions would you make?
* Would you make any alterations to the structure of the experiment to yield better results? What, and why?
===Data===
Publish the data you have gained from your performing of the experiment here.
===Analysis===
Answer the following:
* Does the data seem in-line with the published data from the original author?
* Can you explain any deviations?
* How about any sources of error?
* Is the stated hypothesis adequate?
===Conclusions===
Answer the following:
* What conclusions can you make based on performing the experiment?
* Do you feel the experiment was adequate in obtaining a further understanding of a concept?
* Does the original author appear to have gotten some value out of performing the experiment?
* Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).