User Tools

Site Tools


notes:unix:spring2024:classnotes

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
Last revisionBoth sides next revision
notes:unix:spring2024:classnotes [2024/03/22 16:42] – [UNIX class notes] cgrant9notes:unix:spring2024:classnotes [2024/03/28 09:52] – [Thursday] cgrant9
Line 1: Line 1:
 ======UNIX class notes====== ======UNIX class notes======
-[[#Cleaned VI Notes|VI Notes]]+[[#Week 5|In Depth VI Notes]]
  
-[[#Week 5More VI Notes]]+[[#Cleaned VI Notes|Basic VI Notes]] 
 + 
 +[[#Week 9|REGEX's]]
  
 =====Week 1===== =====Week 1=====
 +<fs xx-large>Welcome to the best class you have ever taken</fs>
 +
 +This page includes some notes, typically major things, from each class session
  
 +Please add notes whenever you can = )
 =====Week 2===== =====Week 2=====
 *Re-went over group and pwd command *Re-went over group and pwd command
Line 244: Line 250:
 ---------------- ----------------
 =====Tuesday===== =====Tuesday=====
 +Virtual class session day
 +
 +Started discussing wpa0
 +
 +in a man page, or vi, or a less pager you can use a forward slash to search for something
 +
 +Remember wildcards are specifically filenames, regex's are for text
 +
 +REGULAR EXPRESSIONS!!!!!!!
 +  
 +Basic REGEX (in Unix)
 +   * .  match any symbol (similar to ? in wildcards)
 +   * *  match zero or more of the previous (similar, but different to * in wildcards)
 +   * ^  match start of line
 +   * $  match end of line
 +   * \< match start of word
 +   * \> match end of word
 +   * [ ] character class; match any one of enclsed (similar to use as wildcard)
 +   * [^ ] inverted character class; do not match any of enclosed (similar to use as wildcard)
 +
 +Extended REGEX
 +   * + match 1 or more of the previous
 +   * | logical or
 +   * ( ) group together
 +   * \( \) REGEX group
 +   * ? match previous item at most once (0-1)
 +   * {n} match previous item exactly n times ie " {3}" looks for exactly 3 spaces
 +   * {n,} match previous n or more times
 +   * {,m} match previous at most m times
 +   * {n,m} match previous at least n, but no more than m times
 +
 +3 types of grep used to be used based on what REGEX's you need
 +   *fgrep - fast grep; no REGEX use
 +   *grep - regular grep; basic REGEX use
 +   *egrep - extended grep; extended REGEX use
 +
 +you can still use extended regex with a regular grep, but they need to be preceded by a \, ie a grep "\?" should work like egrep "?"
 +
 +diff - a command that can show differences in files, assuming they are sorted
 +
 =====Thursday===== =====Thursday=====
 ---------------- ----------------
 +No class, free day to experiment and work on projects
 =====Week 10===== =====Week 10=====
 ---------------- ----------------
notes/unix/spring2024/classnotes.txt · Last modified: 2024/04/16 13:19 by cgrant9