How to know which pages don't have...?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to know which pages don't have...?
# 8  
Old 07-28-2012
Quote:
Originally Posted by OmarKN
Interesting!

And - to shorten - if are all html files (none htm ) then:

Code:
 find chu -type f \( -name '*.html' \) ! -exec grep -q 'exec cgi' {} \; -print

but the cat didn't work in this case, I added:

Code:
 | cat > no_cgi2.txt

bw,
Omar KN
No need for the parenthesis (to override precedence) since the -o (boolean OR) operator is no longer used.
Code:
 find chu -type f -name '*.html' ! -exec grep -q 'exec cgi' {} \; -print > no_cgi2.txt

Regards,
Alister
# 9  
Old 07-28-2012
What about grep's -r (recursive) and -L (files-without-match) options which would make the whole thing - at least for GNU grep -
Code:
grep -Lr "exec cgi" *

If there's file extensions other than .html which you want to exclude add
Code:
|grep ".html"


Last edited by RudiC; 07-28-2012 at 05:59 AM..
This User Gave Thanks to RudiC For This Post:
# 10  
Old 07-28-2012
I'm not certain, but I think OS X does indeed use GNU grep (I recall its userland being an odd mix of mostly BSD tools with a few GNU sprinkles for pizzaz). If that's correct, well done.

Regards,
Alister
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. HP-UX

Looking for some man pages.

Can anyone supply me with the man pages for: omnidatalist omnibarlist omnisap.exe I prefer the source man pages in nroff format. A clue about the software bundles which supply these man pages is fine as well. OS: HP-UX TIA (11 Replies)
Discussion started by: sb008
11 Replies

2. Solaris

MAN PAGES

Hi everyone, I have a small query, in solaris the man pages get displayed on half of the terminal , can i get a full terminal or full screen display ?:) (2 Replies)
Discussion started by: M.Choudhury
2 Replies

3. UNIX for Dummies Questions & Answers

pages out

okay.. have monitored that the page out/h max and avg have been 0 for one week. is this possible...? huge applications will have swap space being utilised ... so i am suprised that for one whole week, it has actually been zero please advise thanks (1 Reply)
Discussion started by: yls177
1 Replies

4. UNIX for Dummies Questions & Answers

man pages

When reading man pages, I notice that sometimes commands are follwed by a number enclosed in parenthesis. such as: mkdir calls the mkdir(2) system call. What exactly does this mean? (4 Replies)
Discussion started by: dangral
4 Replies

5. UNIX for Dummies Questions & Answers

man pages

Hi folks, I want to know all the commands for which man pages are available. How do i get it? Cheers, Nisha (4 Replies)
Discussion started by: Nisha
4 Replies

6. UNIX for Advanced & Expert Users

wired pages

hi, can any body tell, what are wired pages in HP_UX. which structure contains that and plz tell the corresponding system call to get it. (1 Reply)
Discussion started by: venkat_t
1 Replies

7. UNIX for Dummies Questions & Answers

man pages

Hi, I've written now a man pages, but I don't knwo how to get 'man' to view them. Where have I to put this files, which directories are allowed?? THX Bensky (3 Replies)
Discussion started by: bensky
3 Replies

8. UNIX for Dummies Questions & Answers

Man pages

Hello , I just installed openssh in my system . I actually tried to man sshd but it says no entry , though there is a man directory in the installation which have the man pages for sshd . Can anyone tell me how should i install these man pages . DP (2 Replies)
Discussion started by: DPAI
2 Replies
Login or Register to Ask a Question