开发者

Addressing Ambiguous Redirect in Unix Pipe

I have a code that looks like this:

#!/usr/bin/bash
file1=foo.txt
file2=bar.txt
ouput=output.txt

join $file1 <(cut -f1 $file2 | sort -u) > $output

# We will further process $output

But it give me such error.

./mycode.sh: line 4: $output: ambiguous redirec开发者_运维百科t

Is there a way to address it?


cut -f1 $file2 | sort -u > sort.txt
join $file1 sort.txt > $output

just a bit curios, you don't get any other error message?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜