Search Results

Search: Posts Made By: SyphaX
5,412
Posted By SyphaX
I figured out why the command was failing. The...
I figured out why the command was failing. The box has two grep utilities and the default one didn't support -f option. Once I used the other one the script worked as expected. Now I just need to fix...
5,412
Posted By SyphaX
For some reason the 1 line command doesn't work....
For some reason the 1 line command doesn't work. This is what I have:

#!/bin/ksh

find /somepath -type f -name "*.html"| xargs grep -l -F -f /path-to-patterns-file {} \; 2>/dev/null...
5,412
Posted By SyphaX
So based on the above, I made a script that does...
So based on the above, I made a script that does the work:

#!/bin/ksh

for p in $(cat "path-to-patterns-file); do
echo $p;
find ./ -type f -name "*.html" -exec grep -l $p {} \;...
5,412
Posted By SyphaX
I tried the above and the grep command doesn't...
I tried the above and the grep command doesn't seem to work properly. I added a pdf to the pattern file that is linked from other pages but it wasn't found by the grep.
I am starting to think that...
5,412
Posted By SyphaX
Thanks Bakunin. I ran the find pdf on its...
Thanks Bakunin.

I ran the find pdf on its own and saved the output to a file. I have all the PDFs paths/filenames that meet my criteria.

When I was looking at grep -f, I could only find...
5,412
Posted By SyphaX
methyl, This is the box I am using: SunOS...
methyl, This is the box I am using:

SunOS 5.10 Generic_144488-11 sun4u sparc SUNW,Sun-Fire-V440

Shell: -ksh

Thanks for the link bakunin
5,412
Posted By SyphaX
Thanks Xor I am trying to clean up...
Thanks Xor

I am trying to clean up old/orphaned pdf files. I was wondering, is there a way I can run a grep while the find is running to search if each returned file name is linked from an HTML...
5,412
Posted By SyphaX
Find all files before a certain date
Hi all,

I am a beginner and I was hoping you can help me out.

I am doing some PDF cleanup and I am looking for a command to search for all PDFs in a certain folder that are older than 2008 for...
14,787
Posted By SyphaX
So I put the above in a script and when I...
So I put the above in a script and when I executed it I got an error.

$ ksh rule1
rule1: ^M: not found
rule1[2]: syntax error at line 4 : `done' unexpected

Please know that I am still...
14,787
Posted By SyphaX
This my command to match the string: find ./...
This my command to match the string:
find ./ -name '*.html' -exec grep -l "/top/js/file1.js" {} \; 2>/dev/null 1>./output.txt &

The command above prints all the html files that have a reference...
14,787
Posted By SyphaX
Using grep to find files that don't contain a string
Hi all,

I am still learning my way around unix commands and I have the following question.
I have a website and I want to search for all the html pages that don't contain a certain js file. The...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy