allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.38k stars 1.11k forks source link

zsh: command not found:  goaccess on Mac OS #2087

Closed Sergerant closed 3 years ago

Sergerant commented 3 years ago

Hope it's not just me being a noob. But I spent 2 hours searching, so here I am:

Works: goaccess access.log > test.html Doesn't: gunzip -c log.gz | goaccess > test.html

Instead it says: zsh: command not found:  goaccess

Obviously, I don't want to gunzip a single file. Instead I've a rather big amount that I want to gunzip like access-*-.gz

I'm on Mac OS 10.15.7 and the latest goaccess version.

Sergerant commented 3 years ago

removing the spaces before and after the pipe did the trick

gunzip -c log.gz|goaccess > test.html

allinurl commented 3 years ago

Sounds like a zsh thing? Glad that did the trick though. Do you know if running something like gunzip -c log.gz | less or gunzip -c log.gz | cat does the same thing?

allinurl commented 3 years ago

By the way, I'd add the additional dash when piping data to goaccess. e.g., gunzip -c log.gz|goaccess - -o test.html

Sergerant commented 3 years ago

Do you know if running something like gunzip -c log.gz | less or gunzip -c log.gz | cat does the same thing?

yes, it's the same for all commands that follow after the pipe. But I finally figured why:

It's probably related to copying&pasting stuff to the terminal. I brought up the command from the history and just removed the spaces and typed them again. And voilá, it works. Strange, but I'm glad I found this hint on stackoverflow. Especially since 'command not found' happened from time to time in the past. It was a rather sporadical issue -> only happened sometimes. Never knew why. But probably it happened always when clipboard was involved.

allinurl commented 3 years ago

Thanks for sharing that solution!

Closing this, feel free to reopen it if needed.