User Tools

Site Tools


opus:fall2012:ccornair:part3

Part 3

Entries

Entry 1: November 9, 2012

On this day we learned about the diff command. This is signifigant bc you can compare files line by line. I am still struggling a little with the cut command and just need some more practice

Entry 2: November 9, 2012

on this day we learned about the head command. This is print a certain number of the first lines in a file, you can specify how man lines or just use the default of 10. This concept i amkinda struggling with but am working on the different ways to print the number of lines needed.

Entry 3: November 9, 2012

On this day we learned about the tail command. This is signifigant bc you can print the last lines of your choosing in a file, you can choose how many lines with an option or you can just use the default of 10. I am struggling with using the head and tail commands together to print out specific lines in a file.

Entry 4: November 9, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

unix Keyword 3

head

Definition

head is a command used to display the first few lines of a text file or piped data

References

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

en.wikipedia.org/wiki/Head_(Unix)

unix Keyword 3 Phase 2

File removal

Definition

This is used to delete files from the filesystem in linux

References

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

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

lab46:~$ rm hello rm: remove regular file `hello'? y lab46:~$

Experiment 3

Question

what are different ways regular expressions can be used?

Resources

using knowledge gained in class.

Hypothesis

Using regular expression can be very useful when searching words in files, changing one thing in the code will effect the outcome by quite a bit

Experiment

I am going to pull up a file and do certain regular expressions and then change something in it and record the results.

Data

I am referencing /usr/share/dict/words and am only posting few results cat words | egrep “\<pre|\<post” preachy preamble preamble's preambled postbox's postcard postcard's postcards

this gave me all the words that began with pre or post

I then changed it to cat words | egrep “\<pre|\>post” preachy preamble preamble's preambled preambles preambling

this made it so it displayed all words that began with pre or ended with post

Analysis

Based on the data collected:

Yes my hopethesis was correct.  No with the examples I did I received exactly what I though would happen

Conclusions

When using regular expression, just by changing one character in the command will change the results quite a bit

opus/fall2012/ccornair/part3.txt · Last modified: 2012/12/13 16:11 by ccornair