Ubuntu :: Search All Documents Ending In .log For String Of Text?
Oct 27, 2010
I'm trying to search all .log files in ~/.irssi/irclogs/ and it's sub directories for the string 'irssi' and I had though the command I'd used for something similar before was.How should I edit the command, and is it possible to output every line found containing the string to file?
View 4 Replies
ADVERTISEMENT
Aug 2, 2011
I have a file called Regions.ini that looks like this:
Code:
[Granite]
RegionUUID = 54ab7cd2-0e70-49b7-8020-8dbeb84c08d0
Location = 9991,10007
InternalAddress = 0.0.0.0
InternalPort = 9001
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9
[Syenite]
RegionUUID = 8fc56fdd-0afd-4074-9432-0ae8f42b799f
Location = 9992,10007
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9
What I need to do is find out what the IP address is after "ExternalHostName ="
After that I will need to compare that IP to whatismyip and if it's different then replace it but that is easy to do with sed. I just can't figure this simple hurdle out.
View 12 Replies
View Related
Jan 25, 2010
im tryin to make a tool in visual C++ which will take an input string through a text box,then it will compare tht string with a text file containing data and display the matched results in list box.
View 2 Replies
View Related
Jan 3, 2011
What's the easiest way to search for a string in a text file in GNOME or on the console? I used to do this in kfindfile back on KDE.I'd like to avoid downloading something like desktop search if at all possible because I'm away for the holidays and stuck on a dialup connection.
View 5 Replies
View Related
Jan 19, 2010
I need to search a text file for a string of numbers which are different lengths, and always are between number=" and " like:
number="1234567890"
number="22390"
I need to grab those numbers and pipe each one to a line in a file. I've already tried something with awk and that didn't seem to work.
View 10 Replies
View Related
Jun 8, 2011
How can i use different starting and ending delimiters in awk to search for strings or numbers like:
:string"another_string
'number+another_number
now i want string and number as output from above lines. But if i use delimiter as : or ' it will print the entire line coz second delimiter is not same as first one.
View 4 Replies
View Related
Sep 2, 2010
I have a line in a text file that has 40 random characters within a tag and i want to change the characters to a new set of 40 random characters (alphanumeric a-z 0-9 etc)
The line in the text file looks like this:
Quote:
How would i go about doing that?
Also second question same as the above but how would i remove them instead of replacing them?
View 14 Replies
View Related
Apr 26, 2011
If I have a word in a text file and I need to replace it by another word (for example, i need to replace abc by fff) so what is the command I can type it?
I am using vi editor.
View 3 Replies
View Related
Jul 16, 2011
I want to do search and replace in multiple files. I've seen that it possible to create a sed script but I haven't got the talent to do it myselfWhatd is to locate all instances of a word - lets say 'day' - and replace it with for example 'night' in all odm-documents in a specific folder. It would be great if the search only matched whole words and was case sensitive.
View 1 Replies
View Related
Apr 21, 2010
Currently, when I'm searching text in files of my PHP project, I use this line :
Code:
grep -r 'myTextToFind' *
But now, I would like to search only in ".lang" files. How can I do that ?
View 7 Replies
View Related
Oct 22, 2010
Is there hopefully a way to search for an exact string in Man Pages? I know if I want to search for anything containing -c I can just do this.
Code:
/-c
How would I search for "-c"? I want only "-c" to show up. So I tried this.
Code:
/"-c"
It took me literally and looked for the quotes also.
View 8 Replies
View Related
Jan 13, 2011
I have a mail.log file, of which I want to redirect only the search strings of the sender from=<example.sender@exampledomain.com> and the size size=4537 to a file.
In every case the sender string starts as from=<> and the size string starts as size=
What would be the grep command to redirect only the two search strings to a .txt file?
View 2 Replies
View Related
Jul 4, 2010
I would like a command or a bash script that search all files in all sub, modified last 12 hours, in /var/logs and that contains "alfa" or "bravo". The output should be filename of the file or files that contains that.
View 3 Replies
View Related
Sep 1, 2011
how to search for those files which contain word "AM_COLLECTION=22". I need to know all the files with this string. ( I know the grep command can do it but either
View 4 Replies
View Related
Jan 1, 2010
I have PDF files that I would like to be able to search the text of. I tried the GNOME Search for Files program (Places->Search for Files...) but it didn't find the PDF files that contained the text. What do you use to search for text in PDF files?
View 2 Replies
View Related
Jan 19, 2010
I am searching for Class declaration on a site with hundreds of PHP files, how can I do this in the current folder and subfolders using GREP?
I tested cding to the folder and then something like
grep -r 'class MyClass' *.php
View 5 Replies
View Related
Oct 28, 2009
find out a command to search among all *.dat files in a certain path (including subdirectories) looking for the following text in them:
Code:
--------------------------------------------------------------------------------
Elements with small area
Element Adjusted nodes
--------- --------------
16294 NO
17889 NO
and getting the list of elements with small area printed in a file "ErrorEl.txt". The output should have this form:
"/path/01/A.dat
bad-el#01
bad-el#02
[code]....
I know already how to find out the dat files containg a certain string
Code:
c=/path/
grep -R --include="*.dat" "Elements with small area" $c | cut -d: -f1>> ErrorEl.txt
but I don't know then how to get the element numbers(16294 and 17889 in the example above)
View 11 Replies
View Related
Dec 1, 2010
How can I search "$" in vim, which is not the end of line but the real char '$'.
View 1 Replies
View Related
Mar 10, 2011
How can I search for a string (for example, a constant) in all the (.cpp) files in the current direcotire and subdiretories.
View 4 Replies
View Related
Mar 13, 2010
I need to search a string which is in the first line and print that column.
For e.g
Code:
$ top -bn1 | head -20 | awk '/PID/,/*/'
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 13737 admin 15 0 2476 936 680 R 2 0.0 0:00.01
[Code]....
View 6 Replies
View Related
May 1, 2010
but not all, of my text documents show their contents as their icons, instead of using my theme's designated icons for text files. For example, in the above image, the bottom-right file contains: "hello ubuntu forums / this is my problem / how can we fix it? / thank you" and it's icon displays some of this message so that it may be read without opening the file As you can see, the problem occurs with some filetypes, like .txt and .html, but not with others, like .doc or .rtf. How can I force all text files to use my theme's designated icons?
View 2 Replies
View Related
Jan 26, 2010
how to search for a specific string of text inside an html document. I then want to cut out that specific data that the field or string contains. I want to do a shellscript that makes this function automaticly.
For example:
#
#Here i want to find the field "town" inside the html/java and then cut #out the town name from it and paste that to an file.
#
#
[Code].....
View 8 Replies
View Related
Feb 2, 2010
I need to seach a string containing
the substring of 'New Request object:'
and
the substring of '/0x2ab46b1f90' in vi editor,
how do I accomplish that?
View 7 Replies
View Related
Aug 26, 2010
I want to run a script that runs after every 15 minutes that i will do using crontab. But in script want to search a string from the last 15 minutes logs in log file containing data of whole day.
how i can search the string according to time difference that is logs from from current time and current time - 15 minutes.
Sample logs are as follows:
26-Aug-2010 16:38:46,055|9172310750|subscription_app|31ba267e%3A12aadd47bdc%3A50e9|ChargeAmount|ChargingIntercep tor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3
[Code]....
View 6 Replies
View Related
Aug 26, 2009
Below is extract of my file:
What I need is to replace "--destination-path=" with "--destination-path=/home/dest"
i.e. desired output is ----destination-path=/home/dest
I could achieve it with below command
$cat outgoing-xfer|grep destination-path|perl -pi -e "s/destination-path=/destination-path=/home/dest/g"
But the problem is that in this case i just wanted to append "/home/dest" for which I could easily escape "/" with just two "", but I wonder if i have a long path like "/a/b/c/d/e/f/g/h/i/j" I will have to escape so many /. Is there any other way by which I can avoid escaping forward slash.
I tried following:
But receiving follo error
Bareword found where operator expected at -e line 1, near "s/destination-path=/'destination-path=/home"
syntax error at -e line 1, near "s/destination-path=/'destination-path=/home"
Bad name after dest' at -e line 1. tried with enclosing in double quotes as well but in vain
View 5 Replies
View Related
Apr 8, 2009
I am web developer I have this command find . -exec grep "Improve your score" '{}' ; -print for searching through files . I found this command but now i would like to tweak it to gain more out of it.
View 2 Replies
View Related
Jan 22, 2010
how RAR archives work. Suppose I have a .rar archive of text documents (for the sake of argument, containing personal information). I am able to run 'shred *.rar' in that directory from the terminal. What happens here? My assumption is that the contents of the .rar file (pointers to the text documents on the disk?) are 'shredded' (overwritten n times), but the text documents themselves are still on the disk intact.
View 4 Replies
View Related
Jul 7, 2010
I am an astronomy student using Ubunut 10.04, and a frequent user of IRAF ( an *nix image processing application geared toward astronomy). IRAF produces, amongst other things, a text document with various values on it (example below).
Code: K IRAF = NOAO/IRAFV2.14.1 version %-23s
#K USER = name %-23s
#K HOST = Balthazar computer %-23s
#K DATE = 2010-04-29 yyyy-mm-dd %-23s
[Code]...
Now, the information I'm actually interested is the X and Y coordinates down towards the bottom (in this case, 973.505, 271.474).
I have about 800 of these output text files, and I was wondering if there's any sort of script or command that could go through them (presumably reading from a list of file names), and extract the coordinates. Ideally, the output would be a list of coordinates (i.e. X-coordinate, Y-coordinate).
View 1 Replies
View Related
Mar 28, 2010
What is the best way to copy and paste some text among text documents in Linux terminal environment? Suppose I have 2 documents, A and B, and I want to copy some part of A to B. What is the way to achieve this?
View 5 Replies
View Related
Sep 23, 2010
I am using Okular as a chm reader (I know how to use extract_chmlib and htmldoc.. but with those two I can only make HTML-only documents and not image attachments..)and it just happens so I would like my machine to read the text... i have both festival and espeak installed (as well some gnome-based plug-ins)... But I just can't get Okular to speak.
View 2 Replies
View Related