答案 0 :(得分:0)
据我所知,问题仍然存在。也许您可以使用以下解决方法:
I have tried using #!/usr/bin/env bash but it hasn't worked
my AddConstraints.cypher script is as follows:
</>
#!/bin/bash
cat ./AddConstraints.cypher | ./../../bin/cypher-shell -u neo4j -p training-helps --format verbose
</>
my AddConstraints.sh script is as follows:
</>
#!/bin/bash
cat ./AddConstraints.cypher | ../../bin/cypher-shell -u neo4j -p training-helps --format verbose
</>
my MaintainDB.sh script is as follows:
</>
#!/bin/bash
rm -rf ./MaintainDB.log
./AddConstraints.sh 2>&1 >> ./MaintainDB.log
</>
my MaintainDB.log script is just an empty file I made from text editor without a hash bang at the top
I am expecting an output to the MaintainDB.log file and when I run cypher-shell to check for the constraints I am expectimg them to be displayed in the terminal but no constraints are being added when the shell scripts are run