Most of these rules don't really look right to me. In fact, some of them are just totally broken. To get the best results with the least amount of work, try something like this:
Code:
exec sh -c {your commands here}
So do this:
Code:
cat *.passwd 2>/dev/null | cut -d":" -f1 | sort | uniq
exec sh -c {cat *.passwd 2>/dev/null | cut -d":" -f1 | sort | uniq}
The only thing to remember then is that {} is used for quoting so you have to be careful if you have to pass one of those characters in the shell command.