Here's a whacky idea; in a shell script I want to convert every line of stderr into a .
on the same line. I'm still a shell scripting newbie but I know that bash can be quite powerful if you know what you're doing to it.
To begin with I've written a little wrapper on cvs commit
called ~/bin/cvs_commit
which does the following:
#!/bin/sh
cvs commit -m "$1" | grep -v '\.bak*' | grep -v '\.pyc'
Because cvs
prints all folders it recursively traverses I if it's a big tree all of that ugly stuff is print to screen via stderr
. To get rid of that, I've changed my command to:
#!/bin/sh
cvs commit -m "$1" 2>> /dev/null \
| grep -v '\.bak*' | grep -v '\.pyc'
Let's improve even more...