I've got a very ugly pipeline for analyzing web server logs (but nevermind the application; I've come across this in other scripts as well). I want to nicely comment the steps in the pipeline, but I can't seem to do it.
I know, for instance that in csh/sh/bash, a # begins a comment, and any subsequent \ or | will be ignored. I've tried playing with : but to little avail (I'm using bash v3.1).
Here's a sample of the pipeline:
cat /var/log/access_fille \
| grep '".*" 4[0-9][0-9] ' \
| grep -v ' /favicon.ico ' \
| grep -o '".*" 4[0-9][0-9] ' \
| sort | uniq -c | sort -n | tail | tee $tmpfile
Can you see why I might want to comment these steps?