How do I have bash “eat” indentation characters common to all lines in a string?
问题 I have some multi-line string in a shell variable. All lines of the string have an unknown indentation level of at least a few white-space characters (8 spaces in my example, but can be arbitrary). Let's look at this example string for instance: I am at the root indentation level (8 spaces). I am at the root indentation level, too. I am one level deeper Am too I am at the root again I am even two levels deeper three two one common common What I want is a Bash function or command to strip away