bin sh脚本-“("意外 [英] bin sh script - "(" unexpected
本文介绍了bin sh脚本-“("意外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此脚本有什么问题?
#!/bin/sh
for file in *.p; do awk -f get_p.awk "$file" > "$file"er; done
awk -f phase-comp.awk file1 file.per # výpočet fází
paste <(awk '{print $1}' output1) <(awk '{print $2}' file1) > out
错误是:
5: skript: Syntax error: "(" unexpected
当我分别将命令写入终端时.它运作良好.谢谢
When I write command separately to terminal. It works well. Thank you
推荐答案
问题在于您的爆炸力
#!/bin/sh
It means this script is meant to be interpreted by sh
, but your script uses process substitution which is a bash-specific feature. So, you should change it to:
#!/bin/bash
使脚本正常工作.
这篇关于bin sh脚本-“("意外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文