Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试访问名称中包含变量的文件(即 file_n:file_1、file_2 等)。我正在尝试使用
cat $file_$n
但这不起作用。有任何想法吗?
$从文件中删除,改为cat file_$n用于查看文件的内容。
$
cat file_$n