We help IT Professionals succeed at work.

UNIX command to display the names of the files that don't have a text string

ciphersol
ciphersol asked
on
101 Views
Last Modified: 2015-12-27
I need a UNIX command that searches a list of of files (*.log)  that don't contain a search string and displays the name of the files that don't have that string.
Comment
Watch Question

Gerwin JansenTopic Advisor
CERTIFIED EXPERT
Most Valuable Expert 2016

Commented:
grep -L string *. log

Author

Commented:
That's not a valid option for me on HPUX.

grep: illegal option -- L
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvwx] -e pattern_list...
        [-f pattern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [-e pattern_list...]
        -f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvwx] pattern [file...]
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
That does the trick.  Thank  you.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.