##!/bin/bash
set -e
cat << EOF > file1
1
2
3
EOF
cat << EOF > file2
1
2
3
4
EOF
a=$(grep -v -F -x -f file1 file2)
echo 'aa'
b=$(grep -v -F -x -f file2 file1)
echo 'bb not run'
When I run above bash script sudo bash ./***.sh
,b=$(grep -v -F -x -f file2 file1)
cause script stop.
How to fix this problem?