10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
2. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
3. Shell Programming and Scripting
Hi,
Whether we can search multiple strings using or in grep -F
In Generally,
grep -F "string1" "filename.txt"
How to search for multiple string using grep -F as we using grep
grep "string1\|string2" "filename.txt"
Regards,
Nanthagopal A (10 Replies)
Discussion started by: nanthagopal
10 Replies
4. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
5. Shell Programming and Scripting
Greetings.
I have a file with information like this:
AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?
AMNDHRKEEU?AMNDHREOEU?
AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU?
What I need to extract is the position, in every line, of every occurrence of '?'
A desired output would be something... (6 Replies)
Discussion started by: Twinklefingers
6 Replies
6. Shell Programming and Scripting
Hi
I want to search multiple strings in a file . But the search should start with "From" Keyword and end with before "Where" keyword.
Please suggest me.
Thanks (2 Replies)
Discussion started by: sboss
2 Replies
7. Shell Programming and Scripting
I have two files abc.dat and sant.dat (Big file 60k rows)
for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line.
if its present the output needs to go to bde.dat
Example:
contents abc.dat
aaaa
bbbb
cccc
dddd
contents sant.dat
this is... (4 Replies)
Discussion started by: ssantoshss
4 Replies
8. Shell Programming and Scripting
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Discussion started by: daikeyang
9 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I need to find if there is any error in the last few lines of the log file and send a mail accordingly.For example,
Following errors can be logged in the log file.
ERR_1="DB Connection not established"
ERR_2="Server Unloading"
I need to find if these errors are found in the log file and... (3 Replies)
Discussion started by: AnneAnne
3 Replies
10. Shell Programming and Scripting
Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
Discussion started by: HealthyGuy
4 Replies