Solaris bash script using grep giving error
Solaris bash script using grep giving error
(OP)
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 . . .
.#
RE: Solaris bash script using grep giving error
#!/usr/bin/bash
mailq|grep '^[A-F0-9]'|cut -c 42-80|sort |uniq -c|sort -n|tail > /tmp/qResults
RE: Solaris bash script using grep giving error
The internet - allowing those who don't know what they're talking about to have their say.
RE: Solaris bash script using grep giving error