1

I wrote a shell script that bundles a few networking tools together (amass, nmap etc) and they all work fine except httprobe (a tool that takes a list of domains and probes for working http and https servers). The tool is written in Go. The Go Interpreter is in my $PATH. The tool works perfectly when used from the terminal (in any directory including the one the script is in). I wish I could provide more information but I'm stumped and really can't think of how to debug this.

OS: Elementary OS (Ubuntu bionic base)

Dave M
  • 13,250

1 Answers1

0

When you install a program with go install is is put into $(go env GOPATH)/bin, which might be in your home directory, and is probably in your $PATH.

Your script might have go (which is no interpreter) in it's $PATH, but not your $HOME/go/bin (or whereever $(go env GOPATH)/bin is). Since go is a compiler, it is not involved after go install and the binary is self-contained.

Try echo $PATH from the terminal and in the script.

eik
  • 101