Quote:
Originally Posted by jwilleke
Any ideas?
|
Nope, until you show the current version of your script. Please use CODE tags to embed the lines of code, so that the correct spacing is preserved. I suspect you missed an additional blank space in the pattern, but I can only guess.
In the meanwhile you can compare your code with a working example tested with grep-2.5.4 and bash-4.1.7:
Code:
#!/bin/bash
#
teststr='^Sep 7'
grep "${teststr}" /var/log/warn