How do I remove white spaces in Linux?

How do I remove white spaces in Linux?
Answer
The right tool for the job
  1. tr -d ‘ ‘ < input.txt > no-spaces.txt.
  2. tr -d ‘[:blank:]’ < input.txt > no-spaces.txt.
  3. tr -d ‘[:space:]’ < input.txt > no-spaces.txt.
 

Tìm kiếm

Back
Top