如何在bash中转义双引号? [英] How to escape double quotes in bash?
本文介绍了如何在bash中转义双引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在bash中转义双引号,我遵循以下方法:
I want to escape double quotes in bash, I followed the following approach:
#!/bin/bash
this is a \"number\"!
但是我需要知道是否还有另一种方法.
but i need to know if there is another way.
推荐答案
使用GNU bash:
With GNU bash:
echo -e "this is a \x22number\x22"
输出:
this is a "number"
这篇关于如何在bash中转义双引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文