K
K
kolobob2010-10-14 15:52:13
PowerShell
kolobob, 2010-10-14 15:52:13

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

3 answer(s)
S
Sergey, 2010-10-14
@seriyPS

1) you may need an absolute path to the pid file
2) just use /bin/cat. What's the problem then?

K
kolobob, 2010-10-14
@kolobob

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 '<'.

I
IamFM, 2010-10-14
@IamFM

I'm using parentheses instead of quotes, can it help?
pid=$(/bin/cat ./pid/order_$name)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question