Hi, I'm trying to write a script that checks the contents of a file and if it's there skip it.
Here is my test script: #!/bin/sh if [ 0 == grep local /etc/hosts ]; then echo "Been there. Done that." else echo "It's ok to do it now." fi =============================== It doesn't like the 'if' line but I haven't found an example that I can use. Grep returns 0 if the search phrase is found. Quotes, single or double doesn't change it, neither does parens or brackets. Thanks -- Assured Computing When you need to be sure. [EMAIL PROTECTED] www.assuredcomp.com Voice - 541-868-0331 FAX - 541-463-1627 Eugene, Oregon _______________________________________________ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug