User Tools

Site Tools


journal:spring2019:bmather2:week5

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
journal:spring2019:bmather2:week5 [2019/02/26 16:07]
bmather2
journal:spring2019:bmather2:week5 [2019/02/27 14:20] (current)
bmather2
Line 3: Line 3:
 ====Feb 26, 2019==== ====Feb 26, 2019====
  
-add the making of the project directory to the steps file\\+__**IF STATEMENT**__\\
  
-an absolute path to a command must be given in calling it unless said path is in the PATH variable\\ +if [condition]; then\\
- +
-chmod the task files in upf0 to make executable?​\\ +
-read the instructions for the project especially the steps file part\\ +
- +
-IF STATEMENT\\ +
- +
-if [ var= var]; then\\+
 #stuff happens for when you run it\\ #stuff happens for when you run it\\
  
Line 20: Line 13:
  
  
-FOR LOOP\\+__**FOR LOOP**__\\
  
-for ((index=0index<8index++)); do\\+for ( (variable;condition;increment) ); do\\
 #stuff\\ #stuff\\
 done\\ done\\
Line 28: Line 21:
  
  
-VI\\+__//**VI**//__\\ 
 +//(the greatest text editor known to man...)//​\\ 
 +//​(apparently)//​\\
  
-moded editing\\+-'vi (filename)' ​ starts ​editing\\ 
 +-'vi (line number) (filename)'​ this will open the file on that line\\
  
-one where keys are commands\\ 
-one for typing (insert)\\ 
-escape key takes you to command mode\\ 
-v for visual mode (selecting large portions visually)\\ 
-/ is for search (like a man page)\\ 
  
-vi "​filename"​\\ +Vi is a moded editing system, invented before the mouse and when keyboards had less keys.\\
-vi +(line number) (filename) will open on that line\\+
  
-commands\\+**Modes**\\
  
-i insert mode (adds before the current cursor position)\\ +__Command mode__\\ 
-I insert mode (moves the cursor to the beginning of the line)\\ +- This is the starting ​mode\\ 
-a insert mode (appends after where the cursor ​is)\\ +- All other modes are accessed from here\\ 
-A insert mode (moves cursor to the end of a line)\\ +- Escape usually brings you here\\ 
-o insert ​mode (creates a new line under the cursor line)\\ +- Nearly every key stands for command\\ 
-O insert mode (creates a new line above the cursor line)\\ +(see below for commands)\\
-h moves cursor left\\ +
-j moves down\\ +
-k moves up\\ +
-l move right\\ +
-w moves right one word (w counts . : and the like, but W only spaces) [e does the same but to the end of the word]\\ +
-b moves back word (b, B like w and W)\\ +
-{ and } navigates by paragraph\\ +
-(number)G goes to that line number\\ +
-~ toggles the case where the cursor is\\+
  
-yy yank line (copy, there are multiple buffers use "​(letter) ​to select)\\ +__Insert mode__\\ 
-p is paste (P like o and w)\\ +Typing of text happens in this mode\\ 
-dd cut line\\ +These are some ways to start insert mode from command mode:\\ 
-cc change line\\ +-'​i'​ starts insert mode (starts before the current cursor position)\\ 
-x  deletes by character\\ +-'​I'​ starts insert mode (starts the cursor at the beginning of the line)\\ 
-y c d can be used to do by any amount ​(world line etclike\\ +-'​a'​ starts insert mode (starts after where the cursor is)\\ 
-#yl yanks # of characters to the right\\+-'​A'​ starts insert mode (starts the cursor at the end of a line)\\ 
 +-'​o'​ starts insert mode (starts by creating a new line under the cursor ​line)\\ 
 +-'​O'​ starts insert mode (starts by creating a new line above the cursor line)\\
  
  
 +__Other Commands__\\
 +-'​v'​ for visual mode (for selecting large portions visually)\\
 +-'/'​ starts a search (like a man page)\\
 +-'​h'​ moves cursor left\\
 +-'​j'​ moves down\\
 +-'​k'​ moves up\\
 +-'​l'​ move right\\
 +-'​w'​ moves right one word (w counts . : and the like, but W only spaces) [e does the same but to the end of the word]\\
 +-'​b'​ moves back a word (b, B like w and W)\\
 +-'​{'​ and '​}'​ navigates by paragraph\\
 +-'​(number)G'​ goes to that line number\\
 +-'​~'​ toggles the case where the cursor is\\
  
-. repeats the last command\\ +-'​yy'​ yank line (copy, there are multiple buffers use "​(letter) to select)\\ 
-:wq saves and exits\\ +-'​dd'​ cut line\\ 
-:q! exits without saving\\+-'​cc'​ change line\\ 
 +-'​p' ​ is paste (P like o and w)\\ 
 +-'​x' ​ deletes by character\\ 
 +'​y',​ '​c'​ and '​d'​ can be used to do by any amount (word line etc)\\ 
 +i.e. #yl yanks # of characters to the right\\ 
 +-'.' ​repeats the last command\\ 
 +-':wq' ​saves and exits\\ 
 +-':q!' ​exits without saving\\
  
-you can prefix many of these commands (like w/ numbers for repitition)\\+You can prefix many of these commands (i.e. with numbers for repitition)\\
  
  
journal/spring2019/bmather2/week5.txt · Last modified: 2019/02/27 14:20 by bmather2