10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
have a file1
aaa-bbb-ccc-ahave another file2
aaa-bbb-ccc-a fileusing the fgrep command, trying to have only the literal string returned.
fgrep -f file2 file1 is returning
aaa-bbb-ccc-aOnly looking for... (1 Reply)
Discussion started by: jimmyf
2. Shell Programming and Scripting
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
How can I grep for the strings chrome and safari from a file, and if chrome print Chrome/40.0.2214.94 to a file and also count the number of times chrome is found?
... (4 Replies)
Discussion started by: cyberfrog
3. Shell Programming and Scripting
I am trying to get the PID of a process that is defunct. I have two quesitons on this.
1) how do I pass in two strings? This is what I am using now:
ps -ef |egrep -i "programname|<defunct>"
But this returns multiple results with the word defunct in them.
2) How do I make it so that... (1 Reply)
Discussion started by: ChickenPox
I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql
To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Discussion started by: newbie_01
5. Shell Programming and Scripting
I have this code
TrackingId:1362412470675;MSISDN:; INFO - number of clietns:3:Received response is: EMSResponse , protocolVersion=5, purchaseOptions=null, serviceData=ServiceData , screenData=CanvasData ]], title=null, titleResource=MessageResource], screenType=null]], serviceId=idBamboo,... (7 Replies)
Discussion started by: nikhil jain
6. Shell Programming and Scripting
I have a script that periodically checks the Apache error_log to search for a specific error that causes it to hand and, if found, it restarts the service.
I recently found another error that forces it to hand and won't serve pages until it is reset. What I'm trying to do is to get the script to... (3 Replies)
Discussion started by: cfjohnsn
7. Shell Programming and Scripting
I have a problem with grep/fgrep/egrep. Basically I am building a 200 times 200 correlation matrix. The entries of this matrix need to be retrieved from another very large matrix (~100G). I tried to use the grep/fgrep/egrep to locate each entry and put them into one file. It looks very... (1 Reply)
Discussion started by: realwindfly
8. Shell Programming and Scripting
I'm struggling a little here, so I figured it's time to ask for help.
I have a file with a list of several hundred IDs (the hit file- "hitfile.txt"), which is newline delimited, and a much bigger (~500Mb) text file, "FASTA.txt" with several thousand entries, delimited by ">". It's the... (8 Replies)
Discussion started by: Tbox
9. UNIX Desktop Questions & Answers
Can anyone please explain me the difference between grep, egrep and fgrep with examples.
I am new to unix environment.. Your help is highly appreciated.
ravi (2 Replies)
Discussion started by: ravind27
10. UNIX for Dummies Questions & Answers
How can I do an and condition with fgrep.
I want to do:
ps -ef | fgrep -f searchvalues > tempmail.file
mailx -s "Email Subject" firstname.lastname@example.org < tempmail.file
The search values file contains:
What I want is to find things that contain:
mysqld OR... (7 Replies)
Discussion started by: jimmy