User Tools

Site Tools


lx103:notes

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
lx103:notes [2024/04/28 19:37]
114.119.141.71 old revision restored (2024/04/22 11:19)
lx103:notes [2024/05/15 09:52]
114.119.145.194 old revision restored (2023/11/08 01:42)
Line 457: Line 457:
   *CMD MODE   *CMD MODE
     * hjkl, move L R U D     * hjkl, move L R U D
 +    * 0, SHIFT+0 - move to beginning or END of line.
     * L - Move to last line of TERMINAL, not DOC     * L - Move to last line of TERMINAL, not DOC
     * H - move me to top of term.     * H - move me to top of term.
Line 467: Line 468:
     * P - paste on line before the cursor      * P - paste on line before the cursor 
     * u - undo     * u - undo
 +    * 5yy - yank 5 lines
 +    * / - search for text
 +    * n - continue forward in search
 +    * N - go backwards in search
 +    * dd - cut line
 +    * 5dd - cut 5 lines
 +    * ? - search
 +    * cc = del line + goto insert mode
 +    * cw = change word, deletes word and puts you in INSERT mode! Awesome!
 +    * 
 +    * EX MODE
 +    * :%s/HostKey/wahoo - will change first ocurrence of HostKey with wahoo on each line.
 +    * %s/test/wahoo
 +    * %s/test/wahoo/g - change ALLLLL occurrences (thanks /g!)
 +    * :q! - quit
 +    * :wq - write quit
 +    * :w - write
 +    * :r path/to/file - loads contents of that file INTO curr file.
 +    * :!shellCMDhere
 +
 +
 +====== sed Stream Editor ======
 +
 +  *change first occurrence of parttime to promotion.
 +    * sed '0,/parttime/s/parttime/promotion' employees.txt
 +  * change first occur of parttime to fulltime
 +    * sed 's/parttime/fulltime' employees.txt
 +  * change ALL occurrences of parttime to fulltime
 +    * sed 's/parttime/fulltime/g' employees.txt
 +Can move all space to dots, slashes to spaces, etc etc, powerful stuff.
 +RESUME ME, LINUX ACAD VIDEO @4:30m - LEcture, sed Stream Editor!
lx103/notes.txt ยท Last modified: 2024/05/29 06:17 by 114.119.149.71