私のスクリプトには次のコードが含まれています。
bin_dir="/export/neo4j-community-2.0.0-M06/bin"
...snip...
`$bin_dir/neo4j stop`
stoprc=$?
if [ "${stoprc}" -ne "0" ] ; then
echo "Error stopping neo4j. Please check that it is running."
exit ${stoprc}
fi
結果は
Stopping: not found [No such file or directory]
Return code is 127
このスクリプトの ksh -x からの出力を次に示します。
+ /export/neo4j-community-2.0.0-M06/bin/neo4j stop
+ Stopping Neo4j Server '[13634]....' done
restore_graph.ksh[42]: Stopping: not found [No such file or directory]
+ stoprc=127
しかし、コマンド ラインから ="/export/neo4j-community-2.0.0-M06/bin/neo4j stop" を実行しても問題はありません。
: /export/neo4j-community-2.0.0-M06/bin/neo4j stop
Stopping Neo4j Server [12975].... done
: echo $?
0