I am getting a syntax error if I run the shell script using nohup
, where I have added a cat
command in it.
In the script (InboxOnetimeDoneCorrectedWithMerge.sh) I have added this line:
cat $Files/"AML_BM_"$date".TXT" <(tail --lines=+2 $Files/"BRANCHMOG.txt") > $Files/"AML_BM_PLUS_BRANCHMOG_"$date".TXT"
If I run the script InboxOnetimeDoneCorrectedWithMerge.sh using
nohup ./InboxOnetimeDoneCorrectedWithMerge.sh >log.txt &
then I get the below error:
./InboxOnetimeDoneCorrectedWithMerge.sh: line 88: syntax error near unexpected token `('
./InboxOnetimeDoneCorrectedWithMerge.sh: line 88: `cat $Files/"AML_BM_"$date".TXT" <(tail --lines=+2 $Files/"BRANCHMOG.txt") > $Files/"AML_BM_PLUS_BRANCHMOG_"$date".TXT"'
If I just simply run the script using
./InboxOnetimeDoneCorrectedWithMerge.sh
then it gets executed properly.
Why it is throwing syntax error on running it in background ?