Artificial intelligent assistant

How to align only one line in file to the left side with sed or perl one liner 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.

How about


sed '/queued\.max\.requests/s/[\t ]\{1,\}//g' file


or


sed -r '/queued\.max\.requests/s/[\t ]+//g' file


This will remove all space (from the beginning of the line, as well as that surrounding the `=`) from only the line containing `queued.max.requests`.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 848711ff4c1a91eb122f3ea9400ec3b6