Page 1 of 1

Bash: grep and bc Not working

Posted: Sunday 07 February 2016 14:02
by TheSnitz
Hi,

On my bootstrapped Synology NAS ds212+ i installed:

IKPG:
- grep
- sed
- Bash
- bc
- Domoticz 2.4020

What happends:

I have a bash script with cmod 777 rights and there are zero hidden characters (cat -v) (user DOMOTICZ).

In a shell box like Putty or command box the script works just fine.
But if i trigger the script with domoticz i get the error that grep en bc is not valid ect. ( i also tried it to trigger it with lua but i get the same error)
because i use float variabels i need bc for math stuff.


I tried different headers like:
#!sh
#!/bin/bash
#!/user/bin/bash

But that make no sense @all


What can i do?

Re: Bash: grep and bc Not working

Posted: Sunday 07 February 2016 19:45
by nayr
you might have different PATH environments set, try specifying full path to grep and bc

whereis grep
whereis bc

Re: Bash: grep and bc Not working

Posted: Saturday 05 March 2016 18:07
by Number8
I have Domoticz installed on a Raspberry 2. Can't get bc working even at command line level. Is is installed in the Domoticz image ?

Re: Bash: grep and bc Not working

Posted: Saturday 05 March 2016 20:28
by alfred_j_kwak
No. In my Raspberry I just installed it

Re: Bash: grep and bc Not working

Posted: Saturday 05 March 2016 21:05
by Number8
How do you do that? Thanks

Re: Bash: grep and bc Not working

Posted: Saturday 05 March 2016 21:09
by Number8
under root
apt-get install bc
That's it