How can I use grep to find a word inside a folder?

grep -nr ‘yourString*’ . The dot at the end searches the current directory. Meaning for each parameter: -n Show relative line number in the file ‘yourString*’ String for search, followed by a wildcard character -r Recursively search subdirectories listed . Directory for search (current directory) grep -nr ‘MobileAppSer*’ . (Would find MobileAppServlet.java or MobileAppServlet.class or … Read more

Using contains() in LINQ to SQL

Looking at the other attempts saddens me 🙁 public IQueryable<Part> SearchForParts(string[] query) { var q = db.Parts.AsQueryable(); foreach (var qs in query) { var likestr = string.Format(“%{0}%”, qs); q = q.Where(x => SqlMethods.Like(x.partName, likestr)); } return q; } Assumptions: partName looks like: “ABC 123 XYZ” query is { “ABC”, “123”, “XY” }