Stripping single and double quotes in a string using bash / standard Linux commands only
问题 I'm looking for something that will translate a string as follows, using only bash / standard Linux commands: Single-quotes surrounding a string should be removed Double-quotes surrounding a string should be removed Unquoted strings should remain the same Strings with unmatched surrounding quotes should remain the same Single-quotes that don't surround the string should remain Double-quotes that don't surround the string should remain For example: 'Food' should become Food "Food" should