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.

3
  • 3
    Or !/^#/ { ... } (but this matches empty lines too) Commented Jun 25, 2020 at 13:02
  • thanks ! I have a question , if i want to print with the lign that start with "#" , what do I have to change in awk '/^[^#]/ ? Commented Jun 25, 2020 at 13:20
  • @nstatam: You can do some trial and error to find that yourself. If /^[^#]/ ignores lines starting with #, then do the opposite, remove the negation. as /^#/ Commented Jun 25, 2020 at 13:22