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.

Required fields*

6
  • Your second case works by luck: de-escaped-with-warning (\./|\\.) means field delim is 'either any character and slash, or dot (by itself)'. It happens that in your input the only character that ever precedes slash is dot. Similarly (\./|\.) does indeed match any character (and every character) as a field delimiter. FYI you don't need the parentheses. For FS as a regex to match $ yes you must escape. Note however that if FS is a single character it is NOT treated as a regex, just a character, so the single character $ will also work. Commented Feb 22, 2016 at 5:08
  • Do you really want -not -type d rather than -type f ? Commented Feb 22, 2016 at 10:37
  • @symcbean: -not -type d does not mean -type f. Like not negative does not mean positive, it's can be zero. Commented Feb 22, 2016 at 11:32
  • @cuonglm: quite aware of that, just wondering why Gregg wants to parse device nodes and pipes. Commented Feb 22, 2016 at 12:19
  • @symcbean: I had not even considered that what I was doing (by using -not -type d) would include those things. Honestly, I'm not really sure what they are and should read up on them. But I think it is safe to say that using -type f is what I was really after. Thanks! Wish I could upvote comments. Commented Feb 22, 2016 at 19:15