OSX 10.9
I am building a script that evaluates the difference between 2 files. Here is a command that does not work transparently.
Running this command in Terminal yields great results; however when I put that line in a .sh script, I get the errors shown below. Am I doing something silly?
In Terminal:
comm -23 <(sort ~/Desktop/t1.txt) <(sort ~/Desktop/t2.txt)
Outputs (difference between 2 files):
change
hello mate
hello mate = 3
In Script (by itself):
#!/bin/bash
comm -23 <(sort ~/Desktop/t1.txt) <(sort ~/Desktop/t2.txt)
Outputs:
line 2: syntax error near unexpected token `('
line 2: `comm -23 <(sort ~/Desktop/t1.txt) <(sort ~/Desktop/t2.txt)'