P E N C I L
Login
Sed
  1. https://www.gnu.org/software/sed/manual/sed.html#Common-Commands
  2. https://www.digitalocean.com/community/tutorials/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux
  3. Example
    1. sed -n 2p file > out.txt
      1. -n: do not print each line
      2. 2p is a action: address = line2,  command=p means print
  4. Format
    addressCommandOption
    1. Command
      1. p: print
    2. Address
      1. 2p : address= line 2
      2. 2,3p: address = line 2 to line 3 (inclusive)
  5. ls | sed 's/.*username=\(.*\)/\1/'
    1. \( ... \): group 1
    2. \1: replace by group
    3. s/: subtittue