To remove the leading whitespace from each line, you can useawkgsubfunctionto substitute the regular expression^ +(indicating one or more spaces at the start of a line) with an empty string: awk '{gsub(/^ +/, ""
Vim uses magic for Regex patterns by default. Therefore, we need to escape the ‘+‘ character to give it special meaning: match the pattern one or more times. Vim supports automatically executing some Ex commands after reading the file: vim "+ExCommand" "+ExCommand" "+ExCommand" .. fil...