How do I add something at the end of every line in Linux?

Tam ca

New member
How do I add something at the end of every line in Linux?
Answer
Explanation:
  1. sed stream editor.
  2. -i in-place (edit file in place)
  3. s substitution command.
  4. /replacement_from_reg_exp/replacement_to_text/ statement.
  5. $ matches the end of line (replacement_from_reg_exp)
  6. :80 text you want to add at the end of every line (replacement_to_text)
  7. file. txt the file name.
 

Tìm kiếm

Back
Top