|
What is the difference between find-grep and grep-find in Emacs?
Started by J. Pablo Fernández on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
(find-grep COMMAND-ARGS) ....
Keybindings) to answer this question, here's the output for find-grep :
find-grep is an alias for `grep-find' in `progmodes/grep.el'.
|
|
I am trying to find the directory called macports by Find. I do not know where it is in my computer.
I have tried unsuccessfully
find --mindepth 777 macports
How can you find the directory?
Started by Masi on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Depending on your system you can also try
locate macports
find / -name macports -type d.
| grep macports
From any parent directory you might think it lives in .
Try
find .
|
|
In the bash command line, I want to find all files that are named foo or bar . I tried this:
find . -name "foo\|bar"
but that doesn't work. What's the right syntax?
Answer Snippets (Read the full thread at stackoverflow):
\( -name "foo" -o -name "bar" \)
See the wikipedia page (of all places)
I am cheap with find, I would use this:
find ./ | grep -E 'foo|bar'
Thats just my personal pref, I like grep more than find because the....
You want:
find .
|
Ask your Facebook Friends
|
I'm looking for shell scripts files installed on my system, but find doesn't work:
$ find /usr -name *.sh
But I know there are a ton of scripts out there. For instance:
$ ls /usr/local/lib/*.sh /usr/local/lib/tclConfig.sh /usr/local/lib/tkConfig.sh
Why...
Started by Jon Ericson on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If you happen to have a file named tkConfig.sh in your working directory, the find command would expand to:
$ find....
Try quoting the wildcard:
$ find /usr -name \*.sh
or:
$ find /usr -name '*.sh'
If you happen find sees it.
|
|
I was wondering if anyone knows of a way to use the JQuery find method or inArray method to find an item in an array. I can't seem to find anything in the docs.
for example:
var items = [{id:1, name:'bob'}, {id:2, name:'joe'}, {id:3, name:'ben'}]; var...
Started by bendewey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It always returns an empty array if you are not using a DOM .
If you try to search in the jQuery source for the find method.
You can grab it at RichArray
The jQuery find method operates on the DOM.
|
|
Is there a simple way to recursively find all files in a directory hierarchy, that do not end in a list of extensions? E.g. all files that are not *.dll or *.exe
UNIX/GNU find, powerful as it is, doesn't seem to have an exclude mode (or I'm missing it...
Started by Cristi Diaconescu on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
-name \*.exe -o -name....
! \( -name "*.exe" -o -name "*.dll" \)
$ find .
| grep -v '(dll|exe)$'
The -v flag on grep specifically means "find things that don't match this expression."
find .
find .
You could do something like...
|
|
I will better explain my situation with an example.
Considering a httpd.conf file in which I need to change the document root. So first I need to find the ServerName then change the document root, so I believe here I need two regexp but I m not sure how...
Started by mike on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Cat /etc/apache2/http.conf | sed 's/.*ServerName=.*/ServerName=YourNewLocation/' > tmp mv tmp /etc/apache2/http.conf
i am not sure why you need to search for ServerName first, but here... .
I am not sure, but maybe something like this will work for you .
|
|
How to detect the following string from file safely with FIND (cmd.exe default commands), while the name minnie can be anything? its just that FROM: line has me@my.com on it.
From: "Minnie" <me@my.com>
it should not be mixed to this TO line :
To...
Started by Tom on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can find it at: [ http://unxutils.sourceforge.net/ ][1]
You'd then issue a grep command like this:
grep "From.*me\@my\....
I really don't think you're going to be able to accomplish that with find , since find only looks to Win32.
|
|
Is there an alternative version of std::find_if that returns an iterator over all found elements, instead of just the first one?
Example:
bool IsOdd (int i) { return ((i % 2) == 1); } std::vector<int> v; v.push_back(1); v.push_back(2); v.push_back...
Started by Frank on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In STL there isn't, but boost offers this funcionality:
boost::algorithm::find_all
You can just use a for loop:
for (std::vector<int>:iterator it = std::find_if(v.begin(), v.end(), IsOdd); it != v.end(); it = std::find_if(+....
|
|
Hello,
I have a system.collections.generic.list(of ListBox)
I would like to use the collection classes built-in Find method to find a particular ListBox by the Name of the Listbox
I found the following MSDN article
http://msdn.microsoft.com/en-us/library...
Started by Seth Spearman on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Assuming you're using C# 3:
string nameToFind = "saurus"; ListBox found = list.Find(x => x.Name == nameToFind);
For C# 2:
string nameToFind = "saurus"; ListBox found = list.Find(delegate (ListBox x) { return x.Name == nameToFind; });
(Yes, this is ... .
|