08-11-2008
The point with the sed is that it takes more time than a single grep, but you can replace all the greps with a single sed script.
Unless you are a skilled C programmer, I doubt that you can make this a lot faster by switching languages. C programs are compiled, you don't need the C compiler on the box itself in order to run the resulting binary.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all
How can i find Exactly line using grep.
my input file:
avg_configfile:
Recalculation Dates|4|
Recalculation|147|
I tryed like;
grep ^"Recalculation" avg_configfile
out put;
Recalculation Dates|4|
Recalculation|147|
But i want second line avg_configfile.i.e... (4 Replies)
Discussion started by: koti_rama
4 Replies
2. Shell Programming and Scripting
Hi,
i have a file called alert_pindb.log i need to grep and count for all the lines starting with "ORA-" but i need to exclude the line which is having "ORA-00600
"
i am using following syntax to count the ORA- nos
"grep \"ORA-\" alert_pindb.log | wc -l";
since ORA- may be anything... (9 Replies)
Discussion started by: prakash.gr
9 Replies
3. Shell Programming and Scripting
Hi,
I am new to unix, pls help
I have a file suc_Logfile file. liek this.
output
success
success
abc
Now i need to generate a file in shell script where it shows only abc.
Now i am doing like this
grep "^successfully\|$" $suc_Logfile >> $Final_Suc
Pls help.
Thanks,... (6 Replies)
Discussion started by: sailaja_80
6 Replies
4. Shell Programming and Scripting
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Discussion started by: dashing201
11 Replies
6. Shell Programming and Scripting
Hello, I'm trying for days to do a grep without any success. :wall:
I have two patterns being:
1 - Master en Achats
2 - complet
$ find /var/www/mysite/uploads/files/*.doc -exec egrep -l --ignore-case "Master en Achats|complet" {} \;
The problem is that the grep command is done with an... (15 Replies)
Discussion started by: sjolicoeur
15 Replies
7. Shell Programming and Scripting
Hi,
I need to search a word in the java file.
Assume the line in the java file is, (the line was splitted into 3 lines)
1.operationContext.sendFeedback(2.FeedbackType.ERROR, null, "Input is empty.", "Input Details: pr
3.ovide Valid pair(s): "+pairType);
When i grep for the word... (6 Replies)
Discussion started by: tulasiram
6 Replies
8. UNIX for Dummies Questions & Answers
I am performing a regular check on UNIX servers which involves logging onto UNIX servers and using the grep command to check if a GID exists in the /etc/group directory
e.g. grep 12345 /etc/group
I have five to check on each server, is there anyway I can incorporate them into one command and... (2 Replies)
Discussion started by: @MeDaveT
2 Replies
9. Linux
How to search multiple word using grep command
for example i want to reserch
ANJ001
AA
Using ridiculous font, size, and color changes instead of normal space separated text and CODE tags obfuscates what you are trying to do and makes it difficult for volunteers who may want to help you solve... (1 Reply)
Discussion started by: na.dharma
1 Replies
10. Shell Programming and Scripting
Hi,
trying to knock something together to create one line entries based on whether the first word on each line matches a particular value.
eg.
Link,"Name=""Something\something"","Timeout=""1800""",
"Target=""\\thing\thing\thing""","State=""ONLINE""",something,... (0 Replies)
Discussion started by: adamdb
0 Replies