Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 255 Bytes

sed.md

File metadata and controls

13 lines (9 loc) · 255 Bytes

Some useful sed scripts:

  • replace newline with spaces
sed ':a;N;$!ba;s/\n/ /g'
  • modify the line (replace 'c4' with 'c2') if it contains 'particles_grid1' or 'particles_grid2'
sed '/particles_grid1\|particles_grid2/s/c4/c2/' file