Closed Sergerant closed 3 years ago
removing the spaces before and after the pipe did the trick
gunzip -c log.gz|goaccess > test.html
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?
By the way, I'd add the additional dash when piping data to goaccess. e.g., gunzip -c log.gz|goaccess - -o test.html
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.
Thanks for sharing that solution!
Closing this, feel free to reopen it if needed.
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.