iowaprogrammer
ISP
Trying to run the following one liner in a bash script to check our mailq for big users. But I receive the error below when trying to run from a script instead of command line. Command line it works great. Anybody have a solution or alternative?
#!/usr/bin/bash
mailq|grep ^[A-F0-9]|cut -c 42-80|sort |uniq -c|sort -n|tail > /tmp/qResults
result:
checkQueue.sh: [A-F0-9]: not found
Usage: grep -hblcnsviw pattern file . . .
.#
#!/usr/bin/bash
mailq|grep ^[A-F0-9]|cut -c 42-80|sort |uniq -c|sort -n|tail > /tmp/qResults
result:
checkQueue.sh: [A-F0-9]: not found
Usage: grep -hblcnsviw pattern file . . .
.#