12-26-2016
Hello Tanu,
Could you please try to use grep's -E option by joining both searches with | only and let me know how it goes then.
Thanks,
R. Singh
10 More Discussions You Might Find Interesting
1. AIX
Hello,
I'm a newbie on this AIX/Unix.
I'm trying to combine the space of /testing1/ to /testing2/, so that /testing2/ may have more space.
How do I accomplish this?
I guess I have to unmount /testing1/ from /apple26lv first...
but after that I'm not sure how this can be accomplished?
... (3 Replies)
Discussion started by: cchiang12
3 Replies
2. Shell Programming and Scripting
How i can combine output of two commands in one file.......i tried this but it is not working although each command is working good seperately.....
head -1 filename | tail -1 filename
i think there is problem with command concatenator? (16 Replies)
Discussion started by: 33junaid
16 Replies
3. UNIX for Dummies Questions & Answers
Hi,
i tried to combine grep with find and it didnt work
grep 'find dirname filename"
i also would like that the file will be sorted in the way.
thanks a lot. (2 Replies)
Discussion started by: Spoiler
2 Replies
4. Shell Programming and Scripting
I'm working with a file with an xml structure. I'd like to parse it down to just the bits i want. Here is and example of the file
<message id="96352877" method="status">
<date rfc="Sat, 12 Mar 2011 16:13:15 -0600" unix="1299967995" />
<services>
<service id="facebook"... (4 Replies)
Discussion started by: Erulisseuiin
4 Replies
5. Shell Programming and Scripting
sed -e :a -e 's/<*>//g;/</N;//ba' a2.html -removes html tags
and
sed -i 's/YOURS TRULY/Joe Bob/' a2.html
Replaces a string with another string
can i make it into one string? (2 Replies)
Discussion started by: boyboy1212
2 Replies
6. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
7. Shell Programming and Scripting
Hi,
I have two variables
pscmd="ps -exf | grep "
pid=15560
When I say
var=$( $pscmd $pid )
echo $var
it shows output of all processes on the OS rather than just 15560.
So, i guess it only executes "ps -exf | grep " rather than "ps -exf | grep 15560"
Can you... (2 Replies)
Discussion started by: mohtashims
2 Replies
8. Shell Programming and Scripting
Hi,
I've been trying to filter a file which has several repetitions of lines which looks as follows:
('hello
My name is
jamie
blabla
xyz>>)
Each line has different values in them. I want grep or awk or sed to treat everything within the (' and >>) as one line and then filter for a... (2 Replies)
Discussion started by: jamie_123
2 Replies
9. Shell Programming and Scripting
I wish to traverse all files and folders under a given directory say "/tmp/configuration" and for all ip address mentioned therein.
I tried find ./ -type f | xargs grep "*.*.*.*" but it does not populated the correct results.
Can you please suggest. (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
Hello,
I have the following code. I wonder if it can be combined into 1 command.
y=`ls -1| tail -n 1`
m=${y%.abc}
Thank you. (3 Replies)
Discussion started by: april
3 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)