Answer the question
In order to leave comments, you need to log in
bash script problem
There is a bash script that should be run by cron. The process gets the pid from the file (pid=`<pid/order_$name`). Kron just swears that he cannot get pid. From the line the script is started and fulfills perfectly.
If in the script '<' is replaced by /bin/cat, then it starts running well with cron. In the crontab SHELL=/bin/bash
Already broke my head. Need help. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
1) you may need an absolute path to the pid file
2) just use /bin/cat. What's the problem then?
Purely theoretical interest. Such problems may arise with other operators, which will be inconvenient.
An absolute path is specified at the beginning of the script. The problem is not with the paths.
And on another server with a very similar configuration, everything works with '<'.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question