Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login
2 results tagged text_editing

SED: Stream Editor for Text Manipulation/shaare/Uadn6w

  • RHCSA
  • sed
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • text_processing
  • RHCSA
  • sed
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • text_processing

  • Basic Replace Syntax:

    • sed -i 's/KENNY/LENNY/g' filename

    • Substitute all occurrences of "KENNY" with "LENNY"

  • Delete Line Containing String:

    • sed -i '/SEINFELD/d' filename
  • Delete Empty Lines:

    • sed -i '/^$/d' filename
  • Delete First Line:

    • sed '1d' filename
  • sed '1,2d' filename → delete the first two lines

  • sed 's/\t/ /g' filename → replace tabs with spaces

  • sed -n '12,18p' filename → print only lines 12 to 18

  • sed '12,18d' filename → delete lines 12 to 18

  • sed G filename → insert an empty line after every line

  • sed '8!s/seinfeld/S1/' filename → replace "seinfeld" with "S1" on every line except line 8

2 weeks ago Permalink
cluster icon
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • Linux filesystem : /boot -> Grub.cfg /root -> home of root /dev -> system device (mouse, keyboard) /etc -> configuration files /bin -> /usr/bin -> everyday user commands...

Vi Editor/shaare/ucFNUQ

  • RHCSA
  • vi
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • RHCSA
  • vi
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline

Vi Editor Commands

  • i → insert mode
  • I → insert at line start
  • ESC → escape to command mode
  • R → replace mode
  • x → delete character
  • dd → delete line
  • yy → copy line
  • p → paste
  • v → visual mode
  • o → open new line below and insert
  • O → open new line above and insert
  • a → append after cursor
  • A → append at end of line
  • :q! → quit without saving
  • :wq or ZZ → save and quit
2 weeks ago Permalink
cluster icon
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • File Display Commands / Filters / Text Processing Input : File Display Commands cat → Show entire content cat -A → Show non-printable characters more → Paginate output less → Same as more but allows navigatio...


(14)
Links per page
  • 20
  • 50
  • 100
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community