'在运行以下代码时收到语法错误:
#!/bin/bash
for i in (`ls *.nexus`);
do
awk 'NR >5' /path/to/nexus_files/$i | tr -d "'" | tr " " "\n" | sed 's/uce/>uce/g' > /path/to/fasta_files/${i}.fasta
done
错误:
-bash: syntax error near unexpected token `(
当我删除括号时:
-bash: syntax error near unexpected token 'awk'
答案 0 :(得分:3)
在您的简单示例中,您可以使用ls
命令
for i in *.nexus ; do
awk ...
done