This will delete all spaces and tabs at the beginning of every line:
sed 's/^[ \t]*//' file
but lets say we want to align only the parameter queued.max.requests=1000
from file
- Example input:
log.flush.interval.messages=20000 queued.max.requests = 1000 producer.purgatory.purge.interval.requests=100
- Desired output:
log.flush.interval.messages=20000 queued.max.requests=1000 producer.purgatory.purge.interval.requests=100
How we can fit the sed 's/^[ \t]*//'
for this case? Also, I want sed/perl to delete the spaces between the parameter to "=
" and from "=
" to the value in the process.