Created
May 10, 2019 09:34
-
-
Save panpf/564a2ea910e3f5afb43f7075ac1c6218 to your computer and use it in GitHub Desktop.
shell 转义字符串中的双引号
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
originParams='"hello world"' | |
originParamsFormatted=`echo ${originParams//'"'/'\"'}` # 输出结果 \"hello world\" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment