Bash: grep and bc Not working

Moderator: leecollings

Post Reply
TheSnitz
Posts: 10
Joined: Tuesday 29 September 2015 19:31
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Bash: grep and bc Not working

Post 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?
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Bash: grep and bc Not working

Post by nayr »

you might have different PATH environments set, try specifying full path to grep and bc

whereis grep
whereis bc
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Bash: grep and bc Not working

Post 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 ?
Debian buster on NUC and three RPi with buster.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Bash: grep and bc Not working

Post by alfred_j_kwak »

No. In my Raspberry I just installed it
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Bash: grep and bc Not working

Post by Number8 »

How do you do that? Thanks
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Bash: grep and bc Not working

Post by Number8 »

under root
apt-get install bc
That's it
Debian buster on NUC and three RPi with buster.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest