Please get into the habit of posting what Operating System and version you have and what Shell you use.
Any clues about how to identify your files. Are they all with extension .html for example?
Based on the example provided, is this special line on it's own in a single-line file or perhaps somewhere else in each file?
If you install this script in $HOME/bin/no_cgi:
and make it executable:
You can then run the command:
to get a list of html files that don't contain the string "exec cgi". (This assumes that all of your html files have names ending in .htm or .html. If you have html files with other filename suffixes, adjust the -name find primary operand as needed.)
If there aren't any subdirectories under chu, you don't need to use find. In this case, replace $HOME/bin/no_cgi with:
and then run:
This User Gave Thanks to Don Cragun For This Post:
If you install this script in $HOME/bin/no_cgi:
...<snip>...
to get a list of html files that don't contain the string "exec cgi". (This assumes that all of your html files have names ending in .htm or .html. If you have html files with other filename suffixes, adjust the -name find primary operand as needed.)
That's an unnecessarily inefficient solution. There's no need to invoke bash for each file. We can just use grep directly.
Also, the pattern used with -name, *.htm*, can match more than just .htm and .html files. *.htm? would be better, but could still match something undesirable.
Regards,
Alister
---------- Post updated at 12:42 AM ---------- Previous update was at 12:40 AM ----------
Quote:
Originally Posted by OmarKN
My first script, and I let it write out a little file adding:
What can I say, really cool stuff!
You don't need to pipe the results of the script into cat just to redirect the output to a file. You can do the redirection directly.
Congratulations on your first script. I hope you continue to enjoy the learning curve.
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)
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)
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)
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)
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)
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)