01-31-2001
Which version of Unix does this work on? I have never encountered a grep that works like this. A portable solution is:
find . -exec grep string {} /dev/null \;
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Folks;
First about find:
when i run this:
find . -name '*log*' -mtime +10 -print | sed 's+^\./++;s+/.*++' | sort -u
i got list of log files but also get a directories (although directory names doesn't have "log" in it).
How can i exclude the directory from the output of this find command? ... (2 Replies)
Discussion started by: moe2266
2 Replies
2. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Please i need to know the difference between grep, egrep & grep -i when used to serach through a file.
My platform is SunOS 5.9 & i'm using the korn shell.
Regards,
- divroro12 - (2 Replies)
Discussion started by: divroro12
2 Replies
4. Shell Programming and Scripting
Hi All,
Please tell me how can I Find a string using grep & print the line above or below that in solaris?
Please share as I am unable to use grep -A or grep -B as it is not working on Solaris. (10 Replies)
Discussion started by: Zaib
10 Replies
5. Shell Programming and Scripting
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies
6. Shell Programming and Scripting
Hello people!
I would like to create one script following this stage
I have one directory with 100 files
File001
File002
...
File100
(This is the format of content of the 100 files)
2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0
then I have one... (0 Replies)
Discussion started by: Abv_mx81
0 Replies
7. UNIX for Dummies Questions & Answers
I am making an eBook.
I am editing the html in BBedit.
I need to replace all <p class="s5"> with just a <p>.
How do I write this for GREP?
Thank you,
Abby (5 Replies)
Discussion started by: cuddlykitty
5 Replies
8. Shell Programming and Scripting
Guys,
i've got hundreds of C programs in my ~/devel/ directory and sub-directories. is there a way i can use grep -r followed by some zsh, sh, bash, to find some code that starts with "&foo" or something similar?
thanks in advance! (9 Replies)
Discussion started by: Gary Kline
9 Replies
9. SCO
In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies
ZGREP(1) General Commands Manual ZGREP(1)
NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)
ZGREP(1)