I have a file named test.sh:
#!/bin/bash -o pipefail echo "Running test" git diff HEAD^ HEAD -M --summary | grep delete | cut --delimiter=' ' -f 5
When I try to run this script as:
/bin/bash: line 0: /bin/bash: ./test: invalid option name
cat -v test.sh to check if there are carriage returns or anything, but that doesn't seem to be the case. I can run the script if I just run it as
bash test.sh. Grateful for any help, and lmk if I can provide more info!