Category: command

Datacontext ExecuteCommand parameters in IN statement

What is the best way to run a custom sql statement using IN from a C# LinQ to sql datacontext? I have tried: db.ExecuteCommand( “UPDATE tblCard SET used = 1 WHERE id IN ({0}) AND customer_id = {1}”, Request.Form[“ids”], customer_id ); Which is fine for 1 item passed through the form, but if i get […]

using find command to search for all files having some text pattern

I use following find command to find and show all files having the input text pattern. find . -type f -print|xargs grep -n “pattern” I have many project folders each of which has its own makefile named as ‘Makefile’.(no file extension, just ‘Makefile’) How do i use above command to search for a certain pattern […]