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*

3
  • Thank you! I was not sure how to use the [[]] if in this context though I had found it used elsewhere online. The use of awk is creative. Commented Jul 16, 2014 at 12:18
  • No problem! The use of double braces here is actually not necessary, and it's a Bash only syntax that's only really required for using Bash regex =~ or glob comparisons against variables like case does with *. I've updated the post to use the single braces which makes it POSIX shell compliant. Commented Jul 16, 2014 at 12:40
  • I see, thanks. I'm looking at some of your older posts as well to learn some Bash as you give excellent examples. Thank you! Commented Jul 16, 2014 at 12:43