Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • It would says that /foobar is in /foo Commented Jan 9, 2014 at 8:28
  • It would say that /abc/d is in /a.b ($containing_dir taken as a regexp) Commented Jan 9, 2014 at 8:28
  • It would say that /abc is in /foo<LF>/abc (the lines of the pattern string are treated as different patterns to match) Commented Jan 9, 2014 at 8:30
  • It would say that /foo<LF>/abc is in /abc (grep matches on each line of the input, not the whole input so generally can't be used to match file names). Commented Jan 9, 2014 at 8:55
  • Depending on the echo implementation and/or the environment, you'll have issues with filenames containing backslashes echo should really not be used to handle arbitrary data Commented Jan 9, 2014 at 8:56