10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
im trying to find the best way to match an expression using grep.
input file is
<html>word word word word.</a>
<html>word word word word word word .</a>
<html>word word word word word word word word .</a>
<html>word word word word word word word word word word word word word word word word... (4 Replies)
Discussion started by: ahfze
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have the following txt file List_With_Duplicates.txt;
a,1,1
b,3,4
c,5,2
d,6,1
e,3,3
f,3,7
When I run the command
awk -F ',' '{if($2==$3){print $1","$2","$3}}' List_With_Duplicates.txt I get the following output;
a,1,1
e,3,3
This works! as I've compared the 2nd & 3rd... (7 Replies)
Discussion started by: mmab
7 Replies
3. UNIX for Dummies Questions & Answers
Request: grep to find given matching patern and return unique values, eliminate the duplicate values
I have to retrieve the unique folder on the below file contents like;
/app/oracle/build_lib/pkg320.0_20120927
/app/oracle/build_lib/pkg320.0_20121004_prof... (5 Replies)
Discussion started by: Siva SQL
5 Replies
4. Shell Programming and Scripting
Hello everyone,
first post here, trying to learn scripting on my own and this forum as been really helpful so far. I made few little scripts working great but I m facing some problems with RE.
I have a bunch of files in many subdirectories called *001.ext *002.ext OR simple *.ext or *01.ext... (7 Replies)
Discussion started by: Sekullos
7 Replies
5. UNIX for Advanced & Expert Users
Hi,
in a script I will do :
grep ORA- mylogfile.log
If it returns any ORA- (oracle error) I whant to have :
echo "subject : RMAN in Error " >> /appli/rap.txt
But if no error
echo "subject : RMAN OK " >> /appli/rap.txt
Can you help me ?
The grep return code would it be... (1 Reply)
Discussion started by: big123456
1 Replies
6. Shell Programming and Scripting
I'm trying to math all class references in a C++ file using grep with regular expression. I'm trying to know if a specific include is usuless or not, so I have to know if there is a refence in cpp.
I wrote this RE that searches for a reference from class ABCZ, but unfortunately it isn't working... (0 Replies)
Discussion started by: passerby
0 Replies
7. UNIX for Dummies Questions & Answers
I suspect this is commonly done, but haven't found the right combination of search terms to find the answer.
I want to grep for lines in .cpp files that contain only 1 '=' sign in an if statement. e.g.,
if (a = b) -- find this
if (a==b) -- don't find this
My attempt:
egrep... (7 Replies)
Discussion started by: offkilter
7 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies
9. Shell Programming and Scripting
Hi gurus
I am stripping lots of email addresses from a file with this
grep "^To" file.log |awk '{print "1,"$2}' > recipients.out
file.log looks something like this:
oasndfoasnosf
To: person@email.co.uk
lsdfjosd
sdlfnmsopdfwer
dtlghodrgn
To: person2@emailsss.com
sldfnsdf
I... (5 Replies)
Discussion started by: terry2009
5 Replies
10. UNIX for Dummies Questions & Answers
I'm strugling with an expression for grep which I hope someone will be kind enough to help me with.
I'm attempting to isolate those processes which have run for more than a specified time (half a second at the moment). Script so far:
ps -ef | grep '*:5'
The issue is that it's picking up my... (2 Replies)
Discussion started by: kutz13
2 Replies