Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.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 如何在170个文件上同时运行一组命令?_Linux - Fatal编程技术网

Linux 如何在170个文件上同时运行一组命令?

Linux 如何在170个文件上同时运行一组命令?,linux,Linux,我想同时在170个不同的.txt文件上运行以下命令集。在linux上如何做到这一点 awk '{ if ($2 == "T") { print } }' A0FGR8.txt | sort -t $'\t' -k5,5rn | head > A0FGR8_T.txt awk '{ if ($2 == "S") { print } }' A0FGR8.txt | sort -t $'\t' -k5,5rn | head > A0FGR8_S.txt awk '{ if ($2 =

我想同时在170个不同的.txt文件上运行以下命令集。在linux上如何做到这一点

awk '{ if ($2 == "T") { print } }' A0FGR8.txt | sort -t $'\t' -k5,5rn | head > A0FGR8_T.txt   
awk '{ if ($2 == "S") { print } }' A0FGR8.txt | sort -t $'\t' -k5,5rn | head > A0FGR8_S.txt
awk '{ if ($2 == "Y") { print } }' A0FGR8.txt | sort -t $'\t' -k5,5rn | head > A0FGR8_Y.txt
cat A0FGR8_*.txt > A0FGR8_sorted.txt                                
sed -i '1 i\Position\tCode\tKinase\tPeptide\tScore\tCutoff' A0FGR8_sorted.txt

第1步,编辑
awk
awk'$2==“T”'A0FGR8.txt
将正常工作。它只创建了一个名为*\u T.txt的文件,但应该创建170个名为\u T.txt的文件