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 redirect
Is there a way to address it?
just a bit curios, you don’t get any other error message?