Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 用特定名称连接目录中的所有文件_Bash - Fatal编程技术网

Bash 用特定名称连接目录中的所有文件

Bash 用特定名称连接目录中的所有文件,bash,Bash,要连接一系列文件,可以编写: cat file1 file2 ... 现在,如果在一个目录中,有许多文件在它们的 名称,连接它们的一种方法是: cat exon.file1 exon.file2 ... 有没有其他方法可以连接目录中的文件而不写入 每一个在cat命令之后 谢谢 使用外显子。*: cat exon.* 将扩大到: cat exon.file1 exon.file2 ... 正如您所注意到的,您可能希望使用: cat *exon* 这将扩展到其名称中包含外显子的所有文件,

要连接一系列文件,可以编写:

cat file1 file2 ...
现在,如果在一个目录中,有许多文件在它们的 名称,连接它们的一种方法是:

cat exon.file1 exon.file2 ...
有没有其他方法可以连接目录中的文件而不写入 每一个在cat命令之后


谢谢

使用外显子。*:

cat exon.*
将扩大到:

cat exon.file1 exon.file2 ...

正如您所注意到的,您可能希望使用:

cat *exon*

这将扩展到其名称中包含外显子的所有文件,无论具体位置如何。

使用
外显子。*

cat exon.*
将扩大到:

cat exon.file1 exon.file2 ...

正如您所注意到的,您可能希望使用:

cat *exon*

这将扩展到名称中包含外显子的所有文件,无论具体位置如何。

@fedorqui那么整个问题就没有必要了。@fedorqui那么整个问题就没有必要了。