Bash script error: “function: not found”. Why would this appear?

Chances are that on your desktop you are not actually running under bash but rather dash or some other POSIX-compliant shell that does not recognize the function keyword. The function keyword is a bashism, a bash extension. POSIX syntax does not use function and mandates the use of parenthesis. $ more #!/bin/sh function sayIt … Read more

How to run jq from gitbash in windows?

Easiest solution and always latest version: run this curl in your gitbash: curl -L -o /usr/bin/jq.exe or manually save the jq-win64.exe in link above as jq.exe to your /usr/bin (which is in your git bash installation folder) (if you are behind a proxy add the -x proxyhost:port)

Fixing a systemd service 203/EXEC failure (no such file or directory)

I think I found the answer: In the .service file, I needed to add /bin/bash before the path to the script. For example, for backup.service: ExecStart=/bin/bash /home/user/.scripts/ As opposed to: ExecStart=/home/user/.scripts/ I’m not sure why. Perhaps fish. On the other hand, I have another script running for my email, and the service file seems to … Read more