简体   繁体   English

如何在引号,单引号或反引号中使用通配符或任何其他特殊字符?

[英]How do you use wildcards or any other special character in quotes, single quotes or backtick?

How do you use wildcards or any other special character in quotes, single quotes or backtick? 如何在引号,单引号或反引号中使用通配符或任何其他特殊字符?

and

How do you make it so Linux doesn't take it literally? 您是如何做到这一点的,所以Linux不会从字面上理解它? For example 例如

echo "This is my list of file ls -l"

I know their is another way of doing it for example 我知道他们是另一种方式

echo "This is my list of file" ; ls -l

But I'm trying to keep the ls -l inside the echo. 但是我试图将ls -l保留在回显中。

You could use: 您可以使用:

echo "This is my list of file $(ls -l)"

This will print the output of ls -l inside the echo statement. 这将在echo语句中输出ls -l的输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM