Ubuntu :: Filter Specific Text From Source Code With Grep?
Feb 27, 2011
I'm working on a new conky script, and I had the idea to use text from a [URL]... The command I'm using to pull the file is:
Code:
curl -s http://www.thefuckingweather.com/?zipcode=33186 | grep 'ITS FKING *'
However, this gives me the entire line of code this line appears in.
Code:
<br />ITS FKCING NICE</div><div id="remark"><br />
How can I limit this to simply the text?
Sorry about the foul language btw...the words obviously aren't misspelled when I enter them in the terminal
View 5 Replies
ADVERTISEMENT
Dec 3, 2010
i have a sample that looks like this:
Code:
[schneidz@hyper temp]$ wget -q --output-document=- http://world.needforspeed.com/SpeedAPI/ws/game/nfs-w/leaderboards/events
[code]....
View 2 Replies
View Related
Jan 30, 2011
how to filter Date in terminal? I can filter a month from another month using grep but I cant grep multiple months. example, I want to show the data from 20/Jan/2011 to 10/Sep/2011. Grep can only show data of January and September. Is there any other unix commands I can use to achieve what I want?
View 9 Replies
View Related
Feb 21, 2010
In linux, I can grep a string from a file using grep mySearchString myFile.txt.
How can I only get the result which are unique?
View 1 Replies
View Related
Dec 13, 2010
I would like to know how to use grep command to filter the log files created between 3:00 PM to 4:30 PM in buch of log for whole day in different headings. This files resembles like sar file in linux.
View 5 Replies
View Related
Apr 11, 2011
i am already a little bit familiar with linux and now i want to know better the linux OS. i have downloaded the source code of the krnel from the kernel.org and i dont understand the linux source trees organization, so can somebody do me a favor and give me a link to some internet page (or at least a book) that explains that?? i have searched in the internet with the tag:::linux source trees organization and i have not found nothing interesting
View 1 Replies
View Related
Dec 2, 2010
for example
else {
for fileDOC in $location/*.doc
do
[code]...
View 12 Replies
View Related
Sep 12, 2010
I want to see the source code of smplayer software.from where i can see source code of open source softwares?
View 9 Replies
View Related
Nov 7, 2009
I am running a basic squid + privoxy combo for web caching/filtering proxy and it works fine. I'm basically running a stock config w/ a few minor edits to allow the relevant hosts access etc.now I am trying to find an easy way to specify privoxy to not filter a specific site (which it breaks). I have tried wading through the privoxy manual + google but I find the config file incredibly complicated. Are there any experts out there who can tell me: what is the easiest way to tell privoxy to 'pass through' a specific website?
View 2 Replies
View Related
Feb 4, 2010
Please what will it take me to write a perl full functioning program to filter emails for specific rules? Will that be possible? The actual thing am trying to get is to write a perl program and attach to a mail server so that, when the mails come in, the perl script get call and then the perl program will let another external program that is not on the server run and check or filter the mails.
View 8 Replies
View Related
Jan 10, 2011
since some days I have a strange problem with KMail (1.13.5) in KDE4.5.5. When I try to copy some text from an email and past it to any other program (e.g. Openoffice), not only the marked text will be pasted, but a kind of HTML code including the text.
This bug is not OpenSuse specific. I found the same bug in a Fedora mailing list (of course, whithout an answer): Strange Copy/Paste behavior in KMail 1.13.5/Kontact 4.4.8
View 6 Replies
View Related
Mar 23, 2011
Can you find an alternative for Code: wc -l using grep?
View 1 Replies
View Related
Jul 19, 2010
I cannot install the text filter that is usually below the address/search bar.
View 2 Replies
View Related
Jun 2, 2011
I am trying to use grep to only tell me files that include both words matching in a pattern file. However when i specify:
grep -f <pattern file> <file>
It pulls out anything that matches one or the other.
Not both.
how to get it to match AND not OR.
View 9 Replies
View Related
Mar 6, 2010
To search a string pattern in all files in a directory and subdirectories, I am using;
Code:
grep -R "myclass::my-func(" mydirectory/
Now I want grep, to search in only specific file types say *.cc. Please help me. I have read manual of grep, but could not deduce any hint.
Best Regards.
View 7 Replies
View Related
Oct 7, 2010
I'm running GNU Emacs 23.1.1 on "Ubuntu 10.04.1 LTS" and any search I perform using the built-in M-x rgrep on the standard Linux kernel source code (vanilla) ends prematurely with the following error printed to the emacs echo area:Grep exited abnormally with code 123.I have been seeing it for a while on Redhat systems as well, and with other (large) code bases.
View 2 Replies
View Related
Mar 17, 2010
I am not sure which thread this fits in, I am facing a strange problem. There is a code tarball that I cross-compile on a Fedora Core 9 machine and it builds fine. But when I do the same thing on a (heavily used) Fedora Core 7 machine, the build keeps failing in the gnuapp folders grep, coreutils etc. I have tried 'make distclean', and clearing the config.cache but no impact.
Note: I export the PATH variable (to the local cross-compiler) before starting the build. The cross compilation is for the MIPS processor and GNU makefiles are used.
View 1 Replies
View Related
Apr 28, 2011
Q: Is there any way to use grep and sed with a string variable rather than with a file?
The problem: Im running through a LARGE (about 10,000 lines) xhtml file and need to replace every instance of lines beginning <p>~
The following code works but takes a long time mainlly because an in/out operation needs to be carried out on each line. If I could read from a string rather than a file it would take a much shorter time!
Code:
#!/bin/bash
count=$((0))
>tpf
echo "waiting....."
[Code].....
View 4 Replies
View Related
Sep 17, 2010
I have done a bunch of searches on this but the terms seem to get tangled in the more popular search of "colouring the output of grep / awk". I am trying to find a way to grep/awk through the output of a command to find text of a specific colour. The command's output has a range of colours signifying too many different things to specify using text, with colour being the only form of grouping.
View 5 Replies
View Related
Jun 17, 2009
I have a list of words that I want to grep in many files to see which ones have it and which ones dont. in the text file I have all the words listed line by line, ex: list.txt:
check
try this
word1
word2
open space
list ..
I want to grep each line one by one. like I want it to
grep "check" *.log
grep "try this" *.log
grep "word1" *.log .. etc how can I do this?
and maybe write the output to a file.
View 5 Replies
View Related
Jul 20, 2010
I have been using Linux for 2 months, specifically Ubuntu, and been wondering where the source code is. Not only do I wonder where the kernel source code is but also where the source code for the installed programs are.
View 2 Replies
View Related
Sep 1, 2011
I am on Ubuntu 11.04 and using Libre Office 3.3.2 to compose new documents and am saving them using .doc, .ppt and .xls files. (due to having to share them with others who are on Windows systems)
I have a lot of doc files and I need to search for text INSIDE these files. I am perplexed with the fact that no search tool is able to search for text INSIDE these file types. "cat" can display them of course, but grep is not able to locate text INSIDE these file types. I even tried to save a .doc file as an .odt file, but no luck. The Applications>Accessories>Search for Files does not search INSIDE doc, xls or ppt with the option "Contains the text".
View 6 Replies
View Related
Nov 26, 2010
I'm trying to manipulate a large text file full of records (metadata - one complete record per line). I need to delete every line on which certain words appear - there are five different words, all pretty simple all-caps strings with occasional whitespace. I tried using grep -v, which worked a treat, but only string-by-string. Ideally I'd like to run this as grep -v -f, where the file targeted by the -f contains the strings I need to match in order to delete the lines they're in.
i.e. grep -v -f filecontainingSTRINGS.txt targetfile.txt > outputfile.txt
When I try this, however, I don't get any matches - or more specifically, no changes are made in the output file. It works fine if there's only one string in filecontainingSTRINGS, but it doesn't work if there's more than one (I'm using newline as the delimiter). (Also my machine doesn't recognise /usr/xpg4/bin/grep - no idea what that's all about!)
View 5 Replies
View Related
Apr 7, 2010
I want to restrict SSH so that its only accessible via the machines I own on this network. Obviously need to secure user authentication/host authentication, that aside though is the following sufficient at a network level given technical users also use this network? IP addresses are static, though I know they could be spoofed.
Code:
Chain INPUT (policy DROP)
target prot opt source destination
existing-connections all -- anywhere anywhere
allowed all -- anywhere anywhere
[Code]....
View 4 Replies
View Related
Oct 16, 2010
where can i get the full source code of ubuntu ?
i want to study it and mayb il make my own os in the future.
View 3 Replies
View Related
Mar 27, 2011
How to edit Ubuntu Source code to edit Ubuntu how I want? I know I am legally allowed to modify the code but I do not know how?
View 2 Replies
View Related
Jun 7, 2011
Where can I obtain the source code for Ubuntu 10.04.1 LTS?
View 1 Replies
View Related
Jul 24, 2009
I downloaded wine from a windows laptop, but because you have to have a computer running Linux to download it as a .deb package, I had to download the source code as a tar. bz2.
Does anyone know how I compile it and make it executable?
View 6 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
Jul 1, 2010
I need a loop that pulls out the user name into a variable and then pulls out the LastUpdate field into another variable so I can then perform a comparison against the last update field. Requirements are AIX tools including AWK, SED and Perl I am writing a script to check AIX users password expiration dates and if they are within the alerting period (ie. 7 days etc) it will email the user. I will release the full script into the public domain once completed. The text file I want to parse is formatted like:
Code:
colettel:
password = XSON0m4SdIQDw
lastupdate = 1260829398
andrewwa:
[code].....
View 4 Replies
View Related