find

How can I run a curl command for each line of output from my Perl script?

I have a perl script that writes out an array filled with integers to stdout, each on a separate line. So I would get output like: 412 917 1 etc What I would like to do is be able to pipe the output of this script into xargs, and make a curl call using each integer. Something like this: cat input.json | ./jsonValueExtracter.pl -s e...

Using grep to find files that doesn't contain a given string pattern

I'm using the following command in my web application to find all files in the current directory that contain the string foo (leaving out svn directories). find . -not -ipath '.*svn*' -exec grep -H -E -o "foo" {} \; > grep_results.txt How do I find out the files that doesn't contain the word foo? ...

Find a UnorderedList <UL> control inside a master page from a content page in asp.net

Hai guys, I want to find a UL control and then find a LI within that UL and assign a css class to that from a content page.... <ul id="mainMenu" runat="server" style="width:350px;"> <li id="mainHome" runat="server"><a title="Home" href="#" class="home">Home</a></li> <li id="mainManage" runat="server"><a title="M...

BindingSource.Find Multiple Columns

Is it possible to use the Find method of a BindingSource on multiple columns? For example, say I have a gridview displaying current pets; two comboboxes, cboPetType and cboGender; and a button to create a new record into the Pet table based on the values of these two comboboxes. Now, let's say I only want one of each PetType/Gender c...

ls command: how can I get a recursive full-path listing, one line per file?

How can I get ls to spit out a flat list of recursive one-per-line paths? For example, I just want a flat listing of files with their full paths: /home/dreftymac/. /home/dreftymac/foo.txt /home/dreftymac/bar.txt /home/dreftymac/stackoverflow /home/dreftymac/stackoverflow/alpha.txt /home/dreftymac/stackoverflow/bravo.txt /home/dreftymac...

rails find - condition on array of db-fields

I am stuck and I guess it is a syntax thing I just don't get: It's a one(category)_to_many(product) relationship. In my category model I have the columns pick1, pick2, pick3, pick4, pick5. Each of those holds the id of a product. In my category_controller I want to retrieve those in a find: @productpicks = Product.find(:all, :conditi...

Vim: Find text in a specific column

When searching for text in Vim (specifically gVim, but it shouldn't matter), how do you specify what column to search? I'm looking for values in one column only. ...

Bash alias query

How can I turn the following command into a bash alias? find . -name '*.php' | xargs grep --color -n 'search term' Where I can specify the file extension and 'search term' is obviously the search term :) So what I want to do is: searchFiles 'php' 'search term' How do I pass the input into the alias? Should I just create a bash sc...

Find an achor in a Div with javascript

In javascript I have a reference to a div. In that div is an anchor element with a name='foundItem' How do I get a reference to the anchor with the name foundItem which is in the Div I have the reference of? There are 'many' foundItem anchors in other divs on the page. I need 'this' DIVs one. It's for the web site http://BiblePro.Bibl...

Rails virtual attribute search or sql combined column search

Hello All! I have a user model with attributes 'first' and 'last' So for example User.first.first #=> "Charlie" User.first.last #=> "Brown" This User model also has a virtual attribute 'full_name' #user.rb def full_name [first,last].join(' ') end def full_name=(name) #don't know what to do with people w/ middle names split = name...

How to find all files which are basically soft or hard links of other directories or files on linux?

How could I get the list of all linked files on my system or from a certain directory. I used to create links but they became unmanageable with time. I want the list of all such links from a directory. Can anyone help? ...

detect link in 2nd level li and add a span, plus add class to parent li on hover

I'm working on a two level unordered list menu, and so far was able to take some decent newbie steps in figuring out how to show and hide the menu using jQuery, as well as animate it a tad. I have two issues to resolve: I want to have the parent li remain in hover state when it is hovered while the mouse is hovering over its child ul ...

Find <a> with image extension in href (jQuery)

I need to find (and hide) all links with images (.jpg, .png, .gif) in href as they're causing my wordpress excerpts to break. Many thanks. ...

How can I get all files in a directory, but not in subdirectories, in Perl?

How can I find all the files that match a certain criteria (-M, modification age in days) in a list of directories, but not in their subdirectories? I wanted to use File::Find, but looks like it always goes to the subdirectories too. ...

Help regarding Solaris find command

Hi There In Solaris, what is the syntax of find command to find files having multiple file name formats? Eg: In my current directory and in its sub-directories if I have files like test.log, sample.out, demo.buf and some other files, how can I write single find command to find these 3 files. Thank you Chaitanya ...

Find in Files or Quick Find in VS 2008 seems to only work sometimes?

I am working on a project using VS 2008, containing MANY files within projects within solutions. We recently had to convert all our work from VS 2003 to 2008 (you know how big companies are always the last to convert to the lastest version of stuff). In trying a "Find in Files" (or "Quick Find") within 1 solution containing 3 projects...

Algorithm for finding path to point

I'm not sure if I worded this properly, but basically I have an object at point X,Y and I want an algorithm that can get this point to X',Y' but like show its route so I can animate it. I'm building a tile game and when the game starts I want the tiles to magically place themselves into a nice 2d array. So I will generate a random coordi...

default scope in older rails versions

afternoon all. i am working on a project written on rails 2.1 in newer versions we can use a rather cool method to create a default scope like so default_scope :order => 'title ASC' how can the same/similar effect be achieved without upgrading the rails version? ...

Query ragarding Solaris find command with -exec option

I want to create tar file with all the output files resulting from executing find command. I tried the following command: find . \(-name "*.log" -o -name "*.log.*" \) -mtime +7 -exec tar cvf test.tar.gz {} \; But it is including only the last found file in the test.tar file. How to include all files in test.tar file? Regards Chaita...

How can I restrict find to only search specific sub-directories?

I am using find in a Bash script. How can I modify that code to include a specific directory under 'bin' , ie './bin/php/' (while still ignoring all other sub-directories of 'bin')? Current code: find . -name '*.php' \ -and ! -path './bin/*' \ ...