Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.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
Linux 如何将多个参数导入unix命令?_Linux_Shell_Unix_Cut - Fatal编程技术网

Linux 如何将多个参数导入unix命令?

Linux 如何将多个参数导入unix命令?,linux,shell,unix,cut,Linux,Shell,Unix,Cut,我找不到任何类似的问题,因此发布了这个问题 假设我有一组提供输出的命令 cat xyx.txt | awk '{.........}' | sed 's/.../' | cut -d.... cat abc.txt | awk '{.........}' | cut -d ... | sed 's/...../' 产生输出的第一个集合 cat xyx.txt | awk '{.........}' | sed 's/.../' | cut -d.... cat abc.txt

我找不到任何类似的问题,因此发布了这个问题

假设我有一组提供输出的命令

cat xyx.txt | awk '{.........}' | sed 's/.../' | cut -d....   
cat abc.txt | awk '{.........}' | cut -d ... | sed 's/...../'
产生输出的第一个集合

cat xyx.txt | awk '{.........}' | sed 's/.../' | cut -d....   
cat abc.txt | awk '{.........}' | cut -d ... | sed 's/...../'
产生输出的第二个集合

cat xyx.txt | awk '{.........}' | sed 's/.../' | cut -d....   
cat abc.txt | awk '{.........}' | cut -d ... | sed 's/...../'
我想把这两个参数的输出作为“join”命令的两个参数。我知道我可以将这两个文件重定向到一个文件,然后使用join命令将这些文件作为参数

基本上,整件事能在一条线上完成吗。。。。差不多

[first set of commands] > join -1 1 -2 1 < [second set of commands] 
[第一组命令]>join-11-21<[第二组命令]

如果您使用的是bash,这是许多Linux发行版中的默认shell,则表达式:

join <([first set of commands]) <([second set of commands])

加入我想你应该在这里发布:太好了!!非常感谢威廉。现在我需要做什么?我如何才能关闭它并将其设置为您所回答的。