gpt4 book ai didi

bash - bash 中的意外 '('

转载 作者:太空宇宙 更新时间:2023-11-04 12:14:57 24 4
gpt4 key购买 nike

<分区>

我有以下脚本:

#!/bin/sh

# Use the PhiPack software on our two aligned sets of sequences...
mkdir FcFeABC
cd FcFeABC
../bin/PhiPack/Phi -f ../../Data/Real_Sequences_and_Networks/FcFeABC_alignment.fas -o -v -w 10 -g
cd -

mkdir FcL10
cd FcL10
../bin/PhiPack/Phi -f ../../Data/Real_Sequences_and_Networks/FcL10_alignment.fas -o -v -w 10 -g
cd -

# Use the PhiPack software on the simulated Datasets...
cd ../Data/Simulated_Sequences_and_Networks/Constant_Sex/Theta\ =\ 0.066/Theta\ =\ 0.066/Medium/CutSequences/;
rmus=($(ls -d *.fas))
cd -
absfiles=(../Data/Simulated_Sequences_and_Networks/Constant_Sex/Theta\ =\ 0.066/Theta\ =\ 0.066/Medium/CutSequences/*.fas)
if [ ${#rmus[@]} = ${#absfiles[@]} ]
then
mkdir ${rmus[@]}
for ((i=0; i<${#absfiles[@]}; i++));
do
cd ${rmus[$i]}
.../bin/PhiPack/Phi -f ${absfiles[$i]} -o -v -w 10 -g
cd -
done
else
echo "Error, Number of files created and files to be read differs"
fi

第 16 行的哪个命中是错误的:

./runPhiTests.sh: 16: ./runPhiTests.sh: Syntax error: "(" unexpected

这是哪一行:

rmus=($(ls -d *.fas))

我不明白为什么“(”出乎意料——这是将 ls 的结果简单赋值给一个数组。

谢谢,本 W.

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com