User Tools

Site Tools


user:dtubbs2:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:dtubbs2:start [2019/03/07 19:24] dtubbs2user:dtubbs2:start [2019/04/16 19:27] (current) dtubbs2
Line 360: Line 360:
 number=“g” echo “${number}” | grep '^[0-9][0-9]*$' | wc -l will output 0 because nothing is found number=“g” echo “${number}” | grep '^[0-9][0-9]*$' | wc -l will output 0 because nothing is found
  
 +------------------------------------------------------
 +**Unix Week 7**
 +March 7, 2019
 +UPF1 To find the options for each command use -h
 +
 +Precision is decimal value
 +
 +May need to specify to tool what precision is needed
 +
 +Make sure to make steps file that produces output without error
 +
 +Use ; to separate commands
 +
 +Regular Expressions Share conceptual similarities to wildcards
 +
 +Use some of the same symbols
 +
 +Make sure to keep a distinction between regular expressions and wildcards
 +
 +Two Types of Regular Expressions: 1) Basic Regular Expressions (Regex) 2) Extended Regex
 +
 +Basic Regular Expressions:
 +
 +$ will match end of line \? will match 0 or 1 of the previous . will match any single symbol * will match 0 or more of the previous [] (character class) will match any one of enclosed [^ ] (inverted character class) do not match any one of enclosed \< will match start of word \> will match end of word Will use mostly vim, grep, sed
 +
 +Extended Regex + 1 or more of the previous (may need \)
 +
 +() group \( \) regex group (used for remapping data)
 +
 +will use mostly vim, egrep, sed
 +
 +What was done in class today cd /usr/share/dict
 +
 +cat words | grep 'regex' | wc -l
 +
 +cat words | grep '^…..$' | wc -l gives you number of words that have 5 characters
 +
 +cat words | grep '^.[aeiouy].[aeiouy].$' | wc -l gives you the number of words that have 5 characters where the even numbered places are lowercase vowels
 +
 +cat words | grep '^..[^rstlne].' | wc -l gives you the numbers of words that have 4 or more characters where the third letter is not r, s, t, l, n, or e
 +
 +cat words | grep '^…*[mMg]…$' | wc -l gives you words that have 6 or more characters with m, M, or g somewhere in middle
 +
 +cat words | egrep '(ed|ing)$' | wc -l would give you all the words that end with ed or ing
 +
 +cat words | egrep '^(..)+$' | wc -l gives you all the even-symboled words
 +
 +=====Unix Week 9=====
 +----
 +====March 26, 2019====
 +ls -l /usr/local/bin/ gives all of the permissions for files in bin directory
 +
 +urev is a tool that was created for this week's project
 +
 +urev starts off with a welcome screen
 +
 +need to get 144 problems correct in order to get 100% on this project
 +
 +have to wait 2 hours until you can do the next set of problems
 +
 +make sure to complete USR0 before the night that it is due because you won't have enough time to complete it
 +
 +USR0 is a time management project so make sure to set time aside to complete it
 +----------------------------------------------------------------
 +Today we continue to work on our SPF0 project and it is the last day to work on it. So far we have completed pigen and we are working on pigrep. We believe that we have completed pigen to do exactly that is required.
 +
 +Pigrep is designed to perform serches on pigen-generated pi.#.out files
 +
 +So far I have added a ./pigen help page which prints out
 +
 +pigrep - search available pi digits via regex for matches;
 +          must be part of pipeline (send PI digits in via STDIN)
 +
 +   usage: pigrep [OPTION...] PATTERN
 +
 +    note: if MAX variable is set, cap processing at that value
 +
 +"ctrl insert" allows you to copy and paste from browser to a terminal
 +
 +make sure to not "ctrl insert" into command line or it will run those commands    
 +    
 +The next step is to create the actual pattern function
 +I am creating an if statement that will read the user input and then search through the digits of pi to find patterns
 +---------------------------------------------------------------------
 +=====Unix Week 10=====
 +----
 +====April 9, 2019====
 +
 +PCT0 Info Do not need to turn in the practice puzzles but might consider doing them because they will help with the actual puzzle.
 +
 +Goal is to solve and document the puzzle.
 +
 +What was Done in Class First, went over the newest project, PCT0 and what needs to be done for that. Second, we did an example problem for the project PCT0. It was shown how to complete it and the work used to complete it.
 +
 +This newest project is long division with letters that all contain different integer values from 0 through 9. The task is to figure out the key to the puzzle and what integer values each letter has. This project is due Wednesday the 17th. There is a bonus puzzle that if completed the same way that the actual puzzle is, will give bonus points on this project.
 +
 +The trick to solving these puzzles is to look at the long division and seeing what kind of patterns present themselves. Each letter has its own value. The subtractions that are presented with the long division can be used in order to find patterns in order to get what the values are for each letter.
 +
 +It took about an hour to find out the solution key for a puzzle and that was group effort. This puzzle may take a bit of work. May be a good idea to take a couple of breaks in creating it. Apparently the puzzle that was completed in class was classified as hard and the puzzle that is due will have more obvious solutions.
 +----------------------------------------------------------------------
 +=====Unix Week 11=====
 +----
 +====April 16, 2018====
 +
 +**Processing Warranted Numbers**
 +The next project is called Processing Warranted Numbers
 +
 +
 +**Objective of this Project**
 +To create a script that can, with or without information provided by the user, display useful reference data in various number bases
 +
 +Knowing how to do number base conversions can be helpful in this project.
 +
 +Script should take arguments using {$1} and there should be 6 arguments.
 +
 +There are tools that will help remove unnecessary lines of code
 +
 +The good programs that do well on this project are about 150 to 300 lines of code
 +
 +Right justified for the table
 +
 +Make sure everything for the most part is right justified
 +
 +If a part of the project does not get finished, make a text file that explains what does not work so partial credit can be given
 +
 +Quote all variables to be safe
 +
 +---------------------------------------------------------------------
 +**What was Done in Class** 
 +For the first hour or so off class, we went over the next project that is due next Wednesday. The goal of the project is to understand and work with number base. We have to create script that runs without any errors. A good script for this project will be around 150 to 300 lines of code. It seems like it could take a lot of thinking and poking at it. Being well rested will help creating this script similarly to how being well rested helped with the critical thinking project.  
 +----------------------------------------------------------------------
 +**EoCE**
 +The EoCE is the end of course "final exam" that can be done whenever and does not need to be done in the final exam slot for the class. It can be done at any time and outside of class. Make sure to work on it before the last day it is due.
 + 
user/dtubbs2/start.1551986646.txt.gz · Last modified: 2019/03/07 19:24 by dtubbs2