User Tools

Site Tools


opus:fall2012:ccornair:part1

Part 1

Entries

Entry 1: August 29, 2012

On this day I started to learn how to navigate through the directories. This was signifigant because I was able to find my way and see what directories were there. Being so new to the class pretty much nothing makes any sense haha :)! Some of the challenges is just knowing where to navigate to find the directory I am looking for.

Entry 2: August 31, 2012

On this day I learned how to clone, update, commit, pull and push a repository from mercurial. This was signifigant because now I can submit projects, as well as, view projects that I have already done. I am still having some trouble with finding where the directories are so I can navigate to it.

Entry 3: September 26, 2012

ON this day I learned different way to use the wildcard functions, this was signifigant because it showed different ways to search for files and directories. I am still a little fuzzy on some of the search options, but I will practice.

Entry 4: September 27, 2012

On this day I learned different ways to manipulate the cursor in order to save time when editing text. This is signifigant for saving time when trying to write long strings of code and editing. I am still working on these techniques, so these are still new.

Keywords

unix Keyword 1

File Operations

Definition

The Processes of manipulating data and directories. Some examples of this are; reading, writing, creating, seeking and appending files or directories.

Creating a file or directory is essentially the same as writing in the sense of once the program is written, it has to use a compiler to convert it to machine language. Once it is converted, then it can be put in any directory specified and then called upon at a later time to execute

Reading a file is the process of the computer taking the output information that only the computer understands and converting into information that is readable to us. This process is done by interpreters and translators within the computer system.

Writing a file is the process of converting from a natural human language to a language the computer can understand. After writing a code in the system, a compiler such as VI is used in order to convert the information into an executable format that the computer can understand

Seeking is the process of repositioning the file read/write offset. This is done by using what is called a pointer, a pointer refers directly or (points to)information that is stored at another location in memory. So in other words, if the you cannot see the information until the information is “pointed to” or called from memory.

Appending a file is the process of rewriting a file that has already been written. This is done by pointing to the end of the text that was written and adding more the text desired

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

unix Keyword 1 Phase 2

Quotes

Definition

When using the double quotes, it means to quote exactly what is inside and disable any special characters that are within the quotes.

When using singlw quotes, the output, will always get you exactly what's inside the quotation marks, any special characters are disabled from their special meaning and just printed literally.

The use for the back quote is command substitution. Meaning that you are trying to replace something within the command with whatever is in the back quote.

References

www.codecoffee.com/tipsforlinux/articles/26 www.java-samples.com/showtutorial.php?tutorialid=1333 scott.sherrillmix.com/…/using-quotation-marks-effectively-in-unix/

Demonstration

Demonstration of the indicated keyword.

#include <stdio.h>

 
 int main()
{
    printf("hello, world!\n");
    return(0)
}

Experiment 1

Question

Will changing a relevant command in VI by a character or 2 completely change the outcome?

Resources

I just used techniques used in class to perform this experiment and then started manipulating the commands with no prior knowlegde of what the outcome would be.

Hypothesis

I think that just by changing the command string by a character or 2 will chnge the outcome quite a bit if not comepletely.

Basing by what we have learned in class changing a chanracter by either capitolizing, adding a period or even just removing a character or 2 will change the outcome of what happens after the change.

Experiment

I am going to type some lines in VI and then I am going to perform a command. Then I am going to change some of the characters of that command and record the results, then change a little from that command and so on.

Data

First experiment, using the command :%s/m/M/g- this took all of the m's in the entire document and changed them to a M. I them changed everything back and them used the same command but took the /g off of the end changing the command to :%s/m/M. By doing this it changed only the first m it encounters on every line to a M and leaving the rest on that line as it was, then moves to the next line doing the same and so on. I then went back to the original command of :%s/m/M/g and took out the % changing the command to :s/m/M/g. By doing this it changed only the m's on the current line instead of the whole document, I then changed everything back to its original state and then used the same command but I took the /g off the end changing the command to ::s/m/M. This only changed the first m to a M in the current line and then stopped.

Before: Hello, my name is casey cornaire and I am going to try a little experiment in order to test my hopthesis.                  
This test is going to prove that just by changing one or 2 characters will change the outcome quite a bit.
hopefully I will get an A on this and will pass the class.
I am trying to work hard and get a good grade, so maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfiermnefdns;flads

After using the command  :%s/m/M/g:  Hello, My naMe is casey cornaire and I aM going to try a little experiMent in order to test My hopthesis.
This test is going to prove that just by changing one or 2 characters will change the outcoMe quite a bit.
hopefully I will get an A on this and will pass the class.
I aM trying to work hard and get a good grade, so Maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfierMnefdns;flads 

Now results of eperiment when the /g is taken out of the original command changing the command to :%s/m/M
Hello, My name is casey cornaire and I am going to try a little experiment in order to test my hopthesis. 
This test is going to prove that just by changing one or 2 characters will change the outcoMe quite a bit.
hopefully I will get an A on this and will pass the class.
I aM trying to work hard and get a good grade, so maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfierMnefdns;flads                                                  

Analysis

Based on the data collected:

  • Yes my hypothesis was correct, it truly did show that just changing one or 2 characters out of the original command will change the result quite a bit

Conclusions

By doing this experiment I found out the many possibilities that could happen when manupulating commands in a text editor. This could make things very comvenient when trying to change the value of many characters scattered through a document in one short. This also has proven to save time and promote many other theories of commands that can manipulated in order to achieve task quicker and more efficient. Glad I can enlighten you Master Jedi Haas hahaha!!!

opus/fall2012/ccornair/part1.txt · Last modified: 2012/09/28 18:20 by ccornair